ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql

来源:百度知道 编辑:UC知道 时间:2024/06/23 00:17:54
[root@localhost mysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.22-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
mysql> create database njepga;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'njepga'
mysql>

你看下 库名为mysql 数据库中的user 表

看一下 root 用户的 create_priv 权限是否被设置为N了?

也不知道是不是连接用户地过多造成的?

连接数据库的帐号密码错误