- ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
服务没有启动。 - 发生系统错误 5。拒绝访问。
以管理员身份来运行cmd - ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ‘datab
ases;
语法错误,可能是输入法为中文的问题; - 1045 access denied for user ‘root’@’localhost’ (using password no) )
这个错误是由于我在Navicat中修改了root的密码的缘故(刚安装好MYSQL,超级用户root是没有密码的),直接将密码删除即可。
以管理员登录cmd;
输入:net start mysql
输入:mysql -u root -p //有密码就输入密码
输入:update user set password=” where user=’root’;
重新启动下mysql服务就可以啦
*一、密码的修改:使用mysqladmin命令
1、例如你的 root用户现在没有密码,你希望的密码修改为abc,那么命令是:mysqladmin -u root password abc (不需登录进去mysql)
2、如果你的root现在有密码了,那么修改密码为abc的命令是:mysqladmin -u root -p password youyou
注意,命令回车后会问你旧密码,输入旧密码之后命令完成,密码修改成功。
二、密码的消除
1、以root登录:mysql -u root -p
2、mysql>use mysql;
3、mysql>update user set password=” where user=’root’;
重新启动下mysql服务就可以啦*
5. 忘记密码
11. 停止服务
22. mysqld –skip-grant-tables
33. 另外一个cmd:mysql -u root
44. select host,user,password from mysql.user;//即可查看到用户和密码
55. update mysql.user set password=” where user=’root’;//设置空密码
66. net start mysql;//启动mysql服务
6. 1290-The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement
在命令行输入:mysql> flush privileges; //权限问题