修改mysql密码
2016-07-20 13:05
381 查看
mysqld_safe --skip-grant-tables &
sudo /usr/local/mysql/bin/mysqld_safe –user=root &
sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword
update mysql.user set password=‘’ whereUser='root';
flush privileges;
quit
authentication_string
sudo /usr/local/mysql/support-files/mysql.server start
1. 停止 mysql server. 通常是在 '系统偏好设置' > MySQL > 'Stop MySQL Server'
2. 打开终端,输入:
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
3. 打开另一个新终端,输入:
sudo /usr/local/mysql/bin/mysql -u root
UPDATE mysql.user SET authentication_string=PASSWORD('新密码') WHERE User='root';
FLUSH PRIVILEGES;
4. 重启MySQL.
sudo /usr/local/mysql/bin/mysqld_safe –user=root &
sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword
update mysql.user set password=‘’ whereUser='root';
flush privileges;
quit
authentication_string
sudo /usr/local/mysql/support-files/mysql.server start
1. 停止 mysql server. 通常是在 '系统偏好设置' > MySQL > 'Stop MySQL Server'
2. 打开终端,输入:
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
3. 打开另一个新终端,输入:
sudo /usr/local/mysql/bin/mysql -u root
UPDATE mysql.user SET authentication_string=PASSWORD('新密码') WHERE User='root';
FLUSH PRIVILEGES;
4. 重启MySQL.
相关文章推荐
- mysql中FIND_IN_SET的使用方法
- Mysql的存储过程,Mybatis对存储过程的调用
- mysql5.7.13-windows 免安装版配置简介
- MySql LIKE 查找带反斜线“\”的记录
- 安装mysql.so
- mysql 父类子类查询
- mysql存储引擎概述
- 导mysql数据,遇到 longtext 类型,navicat导出会出现乱码
- Mysql用户管理及权限设置
- Mysql:四种常用的MySQL建表语句
- mysql 里面的isnull()和ifnull() is null 和 is not null
- message from server: "Host 'XXX' is not allowed to connect to this MySQL server
- MySQL权限体系
- ubuntu16下安装MySQLdb
- mysql。127.0.0.1和localhost的区别
- 命令行连接到MYSQL数据库服务器
- 50多条mysql数据库优化建议
- python连接mysql并进行操作代码
- 一张图入门MySQL
- mysql workbench 错误 No database selected Select the default DB to be used by double-clicking its nam