MySQL一些痛的領(lǐng)悟
來源:程序員人生 發(fā)布時間:2015-05-06 09:25:59 閱讀次數(shù):2987次
1.mysql> create database aa;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'aa'
這是匿名用戶的意思~~~雖然你以為你是root登錄
解決辦法:改真實的root登錄
F:Softwaresmysql5mysql⑸.6.24-winx64in>mysql --user=root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 12
Server version: 5.6.24 MySQL Community Server (GPL)
Copyright (c) 2000, 2015,
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> create database dbb;
Query OK, 1 row affected (0.00 sec)
注意,mysql --user=root -p 是讓你用root身份登錄,所以下面出現(xiàn)的password是root的密碼,默許為空,直接enter。
F:Softwaresmysql5mysql⑸.6.24-winx64in>mysql --user=root -p
Enter password: ******
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)
這就表示密碼毛病。
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對您的學習有所幫助,可以手機掃描二維碼進行捐贈