mysqldb安装与修改密码


1、安装教程:https://jingyan.baidu.com/article/95c9d20d087fe4ec4e756117.html

  链接: https://pan.baidu.com/s/1p72By5U3EnnsfPpYwfHmlw 提取码: vs64

描述:解压文件之后  找到bin目录 里面会有mysql.exe 和mysqld.exe文件  把目录配置到 环境变量中 剩下的按照教程指引操作

2、安装mysql出现问题:由于找不到VCRUNTIME140_1.dll,无法继续执行代码。重新安装程序可能会解决此问题:https://blog.csdn.net/JackerCSDN/article/details/104425585

  链接: https://pan.baidu.com/s/1SiYg6VnqXJ4NX8JCKs0mZg 提取码: m3it

描述:CMD以管理员身份运行时 可能会出现如上的错误  根据教程操作安装一个微软常用运行库合集

3、修改密码:https://blog.csdn.net/wu19981228/article/details/87982930

描述:我用的是mysqladmin的方法 mysqladmin -uroot -p{oldpassword} password {newpassword}

   例子:mysqladmin -uroot -proot password 111111

4、MySQL 连接出现 Authentication plugin 'caching_sha2_password' cannot be loaded

  处理方案:https://www.cnblogs.com/zhurong/p/9898675.html

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

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

   FLUSH PRIVILEGES;   #刷新权限 

5、mysql执行insert语句的时候

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible 

根据异常信息分析能发现,这个问题主要是由于sql_mode引起,所以先查看sql_mode后修改即可,主要是去除only_full_group_by

  select @@sql_mode
  SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));