mysql5.7如何更改初始密码
这篇文章将为大家详细讲解有关MySQL 5.7如何更改初始密码,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
成都网站制作,成都营销型网站-创新互联科技公司专注营销型网站建设及定制型网站开发。致力为您建设最有价值的网站,服务热线:028-86922220。
[root@qxy2 mysql]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@qxy2 mysql]# grep 'temporary password' /var/log/mysqld.log
2016-05-04T13:46:01.727652Z 1 [Note] A temporary password is generated for root@localhost: _?Xwo>%do7S8
[root@qxy2 mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.12
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> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Xy5686670@';
Query OK, 0 rows affected (0.00 sec)
mysql>
关于“mysql 5.7如何更改初始密码”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
网站名称:mysql5.7如何更改初始密码
转载源于:http://hbruida.cn/article/gdccis.html