这篇文章将为大家详细讲解有关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 input statement.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Xy5686670@';
Query OK, 0 rows affected (0.00 sec)
mysql>
关于“mysql 5.7如何更改初始密码”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。