LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 753|回复: 9

mysql权限问题,请指教?

[复制链接]
发表于 2003-7-27 13:58:16 | 显示全部楼层 |阅读模式
mysql> create database book;
ERROR 1044: Access denied for user: '@localhost' to database 'book'
是不是我的mysql用户建的不对.我按普通用户建的,ID号为501.
发表于 2003-7-27 15:46:55 | 显示全部楼层
用管理员用户进入
use mysql;
select * from user;
看一下你的用户有没有create的权限?不过你的提示好像还没有登陆啊?
@localhost,前面是空的!!!
 楼主| 发表于 2003-7-27 16:12:14 | 显示全部楼层
还是不行:
[root@test bin]# /usr/local/mysql/bin/mysql -u mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 3.23.56

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

mysql> use mysql;
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
发表于 2003-7-28 09:12:33 | 显示全部楼层

# /usr/local/mysql/bin/mysql -u root -p
试试看,你的root用户有密码没有?
 楼主| 发表于 2003-7-29 09:34:24 | 显示全部楼层
[root@test /]# /usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 3.23.56

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

mysql> create database book;
ERROR 1044: Access denied for user: '@localhost' to database 'book'
mysql>
密码是空的。
还是一样。
发表于 2003-7-29 10:15:37 | 显示全部楼层
我也有这个问题,求救呀!!!!!1
 楼主| 发表于 2003-7-29 10:32:46 | 显示全部楼层
我觉得是本地用户权限出问题了,但不知如何解决。
发表于 2003-7-29 13:11:42 | 显示全部楼层
我解决了
#mysqladmin create book -p
Enter password:
试一下你的root的密码,如果不行,把你所有用过的都是一下
我也刚学mysql,请多多指教,相互研究
 楼主| 发表于 2003-7-29 13:21:33 | 显示全部楼层
我的还是不行啊.我觉得我和楼上的兄弟情况不一样.
发表于 2003-8-20 14:45:45 | 显示全部楼层
最初由 jxwaxqb 发表
[root@test /]# /usr/local/mysql/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 3.23.56

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

mysql> create database book;
ERROR 1044: Access denied for user: '@localhost' to database 'book'
mysql>
密码是空的。
还是一样。


我觉得是设置的问题,你看红色的部分,这样看来你根本没有登陆进mysql,不知是你的密码不对,还是设置问题。如果你不确定的话,可以重新编译安装一下,这个笨办法也许可行!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表