安装和配置MySQL的踩坑记录

1、安装和配置教程:

https://blog.csdn.net/weixin_42869365/article/details/83472466

2、错误:安装mysql出现的问题:找不到VCRUNTIME140_1.dll

 参考链接:

https://www.cnblogs.com/zyt6688/p/12601002.html

3、错误:Install/Remove of the Service Denied

在输入mysqld --install后出现Install/Remove of the Service Denied,错误

解决链接:

https://blog.csdn.net/lxpbs8851/article/details/14161935

4、怎么设置密码

在登录的时候发现自己没有设置密码,出现错误如下:

mysql ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES

参照如下链接设置密码

https://blog.csdn.net/qq_20757489/article/details/87868633

但是在上述链接的第7步,给root用户设置新密码:mysql> update user set password=password("123456") where user="root";时出现了如下错误:

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 '("pass") where user="root"' at line 1

参照链接:https://blog.csdn.net/qq_43856284/article/details/100531567

5、修改密码时出现错误:ERROR 1064 (42000) (不同版本的修改密码的语句不同)

针对这个错误,似乎不同的MySQL版本的解决方案不同,我使用的版本是8.20,输入修改密码语句为ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';(不区分大小写)结果显示:Query OK, 0 rows affected (2.72 sec),表示密码策略修改成功!参照链接:https://blog.csdn.net/qq_43856284/article/details/100531567

但是在5.7版本中,输入的修改密码是:update mysql.user set authentication_string = password("新设置的密码") where user="root";  参照链接:https://www.cnblogs.com/cx-code/p/9287274.html

其中提到:我这里mysql的版本是5.7,其中密码列的属性叫做authentication_string;5.1的是password

 6、下载可视化软件SQLyog12.09并破解

参考链接:https://www.jianshu.com/p/46ea86e099d2,其中包含软件注册码

7、在将可视化界面连接Mysql时报错:提示错误plugin caching_sha2_password could not be loaded。参考链接解决

 解决方法如下:

打开cmd:mysql -uroot -p 

进入mysql依次执行下面语句

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码 

FLUSH PRIVILEGES; #刷新权限

重置密码:alter user 'root'@'localhost' identified by 'xzx123456';

原文地址:https://www.cnblogs.com/liliwang/p/13020525.html