我在Mac上重新安装了MySQL Server和Workbench,因为我忘记了密码。我成功了;但是,我收到此消息,提示我无法连接到服务器。
2018-10-21 17:10:13 - Starting server...
2018-10-21 17:10:13 - Executing 'launchctl load -F/Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist'
2018-10-21 17:10:18 - Checking server status...
2018-10-21 17:10:18 - Trying to connect to MySQL...
2018-10-21 17:10:18 - Can't connect to MySQL server on '127.0.0.1' (61) (2003)
2018-10-21 17:10:18 - Assuming server is not running
2018-10-21 17:10:18 - Starting server...
2018-10-21 17:10:18 - Executing 'launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist'
2018-10-21 17:10:18 - Start server: /Library/LaunchDaemons/com.oracle.oss.my
2018-10-21 17:10:18 - Start server: sql.mysqld.plist: service already loaded
2018-10-21 17:10:18 - Server start done.
2018-10-21 17:10:22 - Checking server status...
2018-10-21 17:10:22 - Trying to connect to MySQL...
2018-10-21 17:10:22 - Can't connect to MySQL server on '127.0.0.1' (61) (2003)
2018-10-21 17:10:22 - Assuming server is not running
任何人都可以给我一个有关如何解决此问题的线索吗?谢谢。
答案 0 :(得分:0)
检查mysql是否已启动并正在运行:
ps -aux | grep mysql
如果不是,请使用命令
mysql.server start
或尝试重新启动服务
mysql.server restart
然后尝试重新连接