时间:2021-07-01 10:21:17 帮助过:24人阅读
尝试去查看mysql.socket文件,发现没有。。
$ which mysql
/usr/local/bin/mysql
然后试试重启mysql:
$ mysql.server start
Starting MySQL
. SUCCESS!
哎 ,说明咱的mysql还能用的嘛,其实内心很担心是不是装了zsh导致的不能启动mysql。。
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.17 Homebrew
哈哈 这么简单就启动了 可以查看各种内容了,还是要多动多练才可以
$ mysql.server start $ mysql.server restart $ mysql.server stop $ mysql.server status $ mysql -u root -p $ sudo mysql #以root权限登录
长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
标签:top root权限 which with .com 安装 start 9.png color