安装 mysql 之后,注意添加软连接

mysql 忘记密码操作,

vim /etc/my.cnf

在 [mysqld] 的段中加上一句:skip-grant-tables

重启 mysql 服务, service mysql restart

在输入 mysql -u root -p  输入回车即可进入 mysql 数据库

use mysql;

低版本修改:update user set Password = password('LDtianzhe.') where user = 'root';

高版本修改:update user set authentication_string=password('new password') where user = 'root';

再次vim /etc/my.cnf 注释掉 上面添加的重启服务即可再次进入数据库

如果出现此错误:

ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
需要关闭保护模式

再次使用更新密码即可

退出,注释掉 skip-grant-tables

重启服务即可

最新文章

  1. 使用nose 进行Python项目的自动化测试
  2. iOS开源项目汇总
  3. Windows 之间用rsync同步数据(cwRsyncServer配置)
  4. android自定义View之仿通讯录侧边栏滑动,实现A-Z字母检索
  5. 九度OJ 1437 To Fill or Not to Fill -- 贪心算法
  6. 395. Coins in a Line II
  7. WPF 采用Border创建圆角
  8. JAVA排序(一) Comparable接口
  9. Git Hub,eclipse pull 出现问题
  10. dpdk组态 千兆网卡 驱动 失败 原因分析及 解决方案
  11. JAVA学习笔记 -- 包资源文件jar包裹
  12. 使用 ConfigSource 特性 拆分 Web.config 文件
  13. C/C++静态数组与动态数组的区别
  14. flutter 本地存储 (shared_preferences)
  15. vue-cli之打包多入口配置
  16. open jdk
  17. pandas 读取大文件 read_table C-engine CParserError: Error tokenizing data
  18. 小议常被忽略的a标签:visited属性的特殊用法
  19. php反射机制学习
  20. SharePoint 2013创建应用程序时IIS端口文件夹下没文件

热门文章

  1. 创建java文件和注释
  2. Dubbo和SpringCloud的优劣势比较--总体架构
  3. K8S(04)核心插件-coredns服务
  4. kubernetes实战-配置中心(三)配置服务使用apollo配置中心
  5. php 配置主机虚拟目录(使用虚拟域名访问 127.0.0.1) 一点也不好使?????
  6. vue slot nested bug
  7. 如何强制删除 baidu/tempdata/con.dat 的垃圾文件! How to fix locked SD card: 读卡器 损坏,补救措施!
  8. Apple Watch Series 6 无法使用截屏问题和解决方案
  9. js Array.from & Array.of All In One
  10. Apple & iOS & Device Screen Sizes and Orientations & React Native