Ok
So i went to start my server, and phpmyadmin using MAMP on windows 10 which has been working perfectly for the last few months. It just stopped working this morning. It was working last night.
I'm getting this error
2003 - Can't connect to MySQL server on 'localhost' (10061) — The server is not responding.
mysqli_real_connect(): (HY000/2003): Can't connect to MySQL server on 'localhost' (10061)
The ports in my config file are
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['port'] = '3307'; // MySQL port
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'root'; // MySQL password
The server ports are 8080 3307 for mysql
and for the app database stuff in laravel
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3307'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
我建议您检查MySQL服务是否正在实际运行,并且Windows 10防火墙没有阻止与该服务的连接,例如通过使用mysql命令行客户端。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.