ITPub博客

首页 > 数据库 > MySQL > mysql 5.7 更改初始密码

mysql 5.7 更改初始密码

原创 MySQL 作者:xiaoyan5686670 时间:2016-05-04 22:00:42 0 删除 编辑
[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> 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22569416/viewspace-2093783/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-07-25

  • 博文量
    108
  • 访问量
    276039