1.mysql服务没有启动
打开myql时出现异常,由于mysql服务没有启动
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
2.启动mysql报错
启动mysql和Windows及Ubuntu稍有不同,sodu service mysql start不存在
sodu service mysql start
sudo: service: command not found
查看下mysql的路径
where mysql
/usr/local/bin/mysql
进到相关目录下可以看到mysql.server
mysql.server start
Starting MySQL
. SUCCESS!
ok mysql启动成功