想要连接mysql的时候必须先开启mysql的服务 service mysqld start mysql -u root -p 输入密码 转载于:https://www.cnblogs.com/lxyuuuuu/p/9582739.html