mysql修改root密码
2016-02-22 15:20
483 查看
[root@typecodes ~]# mysql -u root -p [使用root用户登录]
Enter password:
[无密码,直接回车]
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.6-m16
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help.
Type '\c' to clear the current input statement.
mysql> select * from mysql.user;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password='this is a password sample';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
######设置当前root用户密码
mysql> set password='MYSQLroota7612198981@';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Enter password:
[无密码,直接回车]
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.6-m16
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help.
Type '\c' to clear the current input statement.
mysql> select * from mysql.user;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password='this is a password sample';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
######设置当前root用户密码
mysql> set password='MYSQLroota7612198981@';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
相关文章推荐
- MySQL处理重复数据的方法
- 查看mysql改写后的sql
- MySQL中备份的几种方式
- 教你在 Debian 和 Ubuntu 上升级 MySQL
- 数据库_MySQL 游标的使用和结果集的遍历
- Mysql存储过程
- MySql记录
- MySQL创建用户的三种方法
- mysql中的数据库操作
- C#操作mysql数据库
- Mysql数据类型 和 运算符
- mysql 中用户与权限的操作
- MySQL 修改字段类型或长度
- MySQL参数DELAY_KEY_WRITE的详细说明
- mysql删除重复记录并只保留一条
- 解决 mysql 数据库 挂掉了
- mysql查询今天、昨天、本周、本月、上一月 、今年、某年、当年12月每月时间、当年每月每周时间
- mysql授权
- mysqldump备份数据库时排除某些库
- mysql中int、bigint、smallint 和 tinyint的区别详细介绍