新安装的mysql登录不了_mysql 5.6 新安装登录
mysql 5.6提高了安全性,默認安裝完之后,不允許空密碼登錄,而是在/root/.mysql_secret,記錄了密碼,所以首次登錄,必須用這個文件里面的密碼登錄
[root@nagios ~]# cat .mysql_secret
# The random password set for the root user at Mon Oct 28 17:24:41 2013 (local time): Zirbdc2P
[root@nagios ~]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.13
mysql> use mysql;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password=password('123456');
Query OK, 0 rows affected (0.10 sec)
必須強制你修改密碼,否則不讓操作,必須用set password命令修改,修改后
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
總結
以上是生活随笔為你收集整理的新安装的mysql登录不了_mysql 5.6 新安装登录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 车险都有哪些险种
- 下一篇: oracle重启数据库一般要多久,优化O