MySQL 忘记root密码解决办法
来源:互联网 发布:sql时间值对比 编辑:程序博客网 时间:2024/04/30 04:54
- 很多时候mysql安装完root用户的默认密码不为空,这时候就需要通过其它办法登入到mysql重置密码。步骤方法1:查看/root/.mysql_secret文件安装mysql第一次会生成一个随机密码,可以用该密码登入,随机的密码已经生成 可以在 '/root/.mysql_secret'. 中找到。方法2:使用mysqladminmysqladmin无法修改密码mysqld_safe --skip-grant-tables &mysql -uroot -puse mysql;update user set password=PASSWORD("newpassword")where user="root"; 或者 authentication_string 这个字段flush privileges;quit方法3:添加"skip-grant-tables"在/etc/my.cnf [mysqld] 配置部分添加"skip-grant-tables"重启mysql服务service mysqld restart登入mysqlmysql -uroot -p mysqluse mysql;update user set password=password("password") where user='root';更新flush privileges;删除/etc/my.cnf [mysqld] 配置部分的"skip-grant-tables"重启mysql服务service mysqld restart使用新密码登入mysql -uroot -p修改完密码第一次登入可能会报错‘ERROR 1820 (HY000): You must SET PASSWORD before executing this statement ’,需要重新修改当前登入密码。修改当前用户密码SET PASSWORD = PASSWORD('123456')
0 0
- MySQL忘记root密码解决办法
- MySQL忘记root密码解决办法
- mysql忘记root密码解决办法
- mysql忘记root密码解决办法
- MySQL忘记root密码解决办法
- mysql忘记root密码解决办法
- mysql忘记root密码,解决办法
- MySQL 忘记root密码解决办法
- mysql忘记root密码解决办法
- MySQL 忘记root密码解决办法
- 忘记mysql root密码解决办法
- Mysql忘记root密码的解决办法
- 忘记mysql root账号密码的解决办法
- linux 下 mysql root 密码忘记解决办法
- 忘记mysql的root密码的解决办法
- windows下mysql忘记root密码解决办法
- linux上mysql root密码忘记解决办法
- linux下忘记mysql root密码解决办法
- Linux环境下socket常用API介绍
- jpa与hibernate结合标注的归属
- Android ScrollView滑动的监听方法为什么会报错
- linux下对SqlServer进行权限开放
- 已将该虚拟机配置为使用 64 位客户机操作系统
- MySQL 忘记root密码解决办法
- xcode8插件收集 Awesome native Xcode extensions
- 为freeswitch 添加h323支持
- Qt编写自定义控件二动画按钮
- mongo 使用手册
- DatePickerDialog onDateSet 调用两次解决方案
- android activity之间传递bean类型数据如(list<UVedioBean> )
- 任务分解
- 开源的魅力:编译OpenCV源代码