这篇文章将为大家详细讲解有关mysql 5.7如何更改初始密码,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
[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 inpu免费主机域名t statement.
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘Xy5686670@’;
Query OK, 0 rows affected (0.00 sec)
mysql>
关于“mysql 5.7如何更改初始密码”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
相关推荐: MySQL GTID与MariaDB GTID的不同之处有哪些
小编给大家分享一下MySQL GTID与MariaDB GTID的不同之处有哪些,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!GTID是全称是Global Transaction I…