在此之前的错误是:
ERROR 1045 (28000): Access denied for user ‘ODBC’@‘localhost’ (using password: YES)
打开cmd命令行进入到mysql安装的目录下的bin文件夹下
运行mysqld --skip-grant-tables
之后变成这个错误:
ERROR 1045 (28000): Access denied for user ‘ODBC’@‘localhost’ (using password: NO)
也就是现在不用输入密码就可以直接登录mysql,输入密码的时候直接回车就好了
接下来重置mysql的密码
碰到的这个错误:
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 ‘password(‘123456’)’ at line 1
解决方案见:ERROR 1064 (42000)
修改成功即可exit
重新启动了mysql服务
再次连接就没问题了。