MySQL5.7初始密碼檢視及重置
1.檢視初始化密碼:
[root@lone-centos67 ~]# grep 'temporary password' /var/log/mysqld.log
2016-10-13T06:30:03.521325Z 1 [Note] A temporary password is generated for root@localhost: E<apj1+mshge
<apj1+mshge
初始化密碼為:E<apj1+mshge
密碼是隨機產生的
</apj1+mshge
2.登入及修改密碼
[root@lone-centos67 ~]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.15 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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>
mysql> show databases;
修改密碼
mysql> alter user root@localhost identified by 'xxx';
新密碼要求,必須包含大小寫字母數字及符號。
關閉密碼複雜度驗證:
在my.cnf新增validate_password=off
</apj1+mshge
</apj1+mshge
[root@lone-centos67 ~]# grep 'temporary password' /var/log/mysqld.log
2016-10-13T06:30:03.521325Z 1 [Note] A temporary password is generated for root@localhost: E<apj1+mshge
<apj1+mshge
初始化密碼為:E<apj1+mshge
密碼是隨機產生的
</apj1+mshge
2.登入及修改密碼
[root@lone-centos67 ~]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.15 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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>
mysql> show databases;
修改密碼
mysql> alter user root@localhost identified by 'xxx';
新密碼要求,必須包含大小寫字母數字及符號。
關閉密碼複雜度驗證:
在my.cnf新增validate_password=off
</apj1+mshge
</apj1+mshge
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28282660/viewspace-2126555/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql5.7重置root密碼MySql密碼
- mac版MySQL重置初始密碼MacMySql密碼
- docker檢視jenkins初始密碼DockerJenkins密碼
- CentOS初始化Mysql5.7密碼CentOSMySql密碼
- Oracle 重置密碼及基本操作Oracle密碼
- MySQL修改使用者密碼及重置root密碼MySql密碼
- 重置Oracle密碼Oracle密碼
- U盾密碼密碼重置方法密碼
- mysql5.7及以後版本設定密碼MySql密碼
- MySQL 重置Root密碼MySql密碼
- mysql重置root密碼MySql密碼
- aix重置ROOT密碼AI密碼
- centos 7 重置密碼CentOS密碼
- Ubuntu重置root密碼Ubuntu密碼
- 海康威視攝像頭重置密碼問題密碼
- windos IE密碼檢視密碼
- windows檢視wifi密碼WindowsWiFi密碼
- 經典星號檢視器檢視密碼密碼
- win10如何檢視wifi密碼_win10檢視wifi密碼方法Win10WiFi密碼
- 輸入密碼檢視flag密碼
- MySQL 8.0 重置 root 密碼MySql密碼
- CentOS 7.5 重置 root 密碼CentOS密碼
- MySQL 8 下重置密碼MySql密碼
- Mac-mysql 密碼重置MacMySql密碼
- Mysql 5.5 重置root密碼MySql密碼
- win10 如何檢視wifi密碼_window10如何檢視無線密碼Win10WiFi密碼
- 群暉NAS忘記密碼如何重置密碼密碼
- PbootCMS忘記密碼後的重置密碼流程boot密碼
- mysql初始化後修改密碼及賦權MySql密碼
- Redis 密碼設定和檢視Redis密碼
- Mac下MySQL密碼重置方法MacMySql密碼
- linux重置寶塔密碼Linux密碼
- 邏輯漏洞之密碼重置密碼
- HP-UX重置root密碼UX密碼
- 重置weblogic控制檯密碼Web密碼
- my sql 密碼重置【網路】SQL密碼
- Linux下重置MySQL密碼LinuxMySql密碼
- MySQL 資料庫重置密碼MySql資料庫密碼