确保你的MySQL服务正在运行
service mysqld start然后,尝试下列之一:如果没有为MySQL设置密码
service mysqld start
mysql -u root如果已经设置密码
mysql -u root
mysql -u root -p