我很久以前就用brew install mysql在我的MySQL Sierra上安装了mysql,每次我关闭和打开我的电脑,mysql都会自动启动,这真是太棒了。但不幸的是,昨天我需要暂时关闭MySQL -所以我在互联网上找到了一些命令(但它不是brew services stop mysql),在那之后,当我重新启动我的计算机时,MySQL没有启动(我无法通过Sequel Pro GUI MySQL客户端连接)。所以我试着运行它:
brew services start mysql
==> Successfully started `mysql` (label: homebrew.mxcl.mysql)但是我还是连接不上:
发布于 2017-06-24 19:41:04
我尝试使用以下命令(更改root密码)进行连接,并得到提示:
Mac-mini-Kamil:local Kamil$ mysqladmin -u root password 'xxxx'
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!我在互联网上输入这个“提示”,发现我需要运行以下命令:
mysqld
这是有效的:) (我能够连接到我的数据库)
https://stackoverflow.com/questions/44736018
复制相似问题