前言:
目前兄弟们对“mysql的默认密码”都比较着重,看官们都需要分析一些“mysql的默认密码”的相关内容。那么小编在网摘上网罗了一些对于“mysql的默认密码””的相关资讯,希望兄弟们能喜欢,看官们快快来学习一下吧!1、登录配置文件查看mysql的日志文件路径
[root@controller ~]# vim /etc/my.cnf
2、在日志文件的开始部分有默认的mysql密码
[root@controller ~]# vim /var/log/mysqld.log
3、使用默认密码登录到mysql数据库,然后修改密码。在没有修改密码之前数据库操作命令无法使用。
[root@controller ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.16
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> set password=password('abc@345');
Query OK, 0 rows affected, 1 warning (0.00 sec)
标签: #mysql的默认密码