我是mysql命令行级别的新手。不幸的是,我设置的赋值意味着我必须使用命令行。我正在通过PuTTY访问学校的服务器。登录没有问题,他们输入mysql -p,登录很好,但是当我去创建数据库时,我得到了1044错误。我也尝试过root,但也没有成功。
login as: 10081552
Using keyboard-interactive authentication.
Password:
Last login: Sat Dec 7 16:04:24 GMT 2013 from 90.218.202.89 on ssh
Last login: Sat Dec 7 16:04:29 2013 from 90.218.202.89
10081552@sots ~ $ mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8636
Server version: 5.0.90-log Gentoo Linux mysql-5.0.90-r2
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database hello;
ERROR 1044 (42000): Access denied for user '10081552'@'localhost' to database 'hello'
mysql>我检查了权限,它们看起来很好(我想)
mysql> show grants;
| Grants for 10081552@localhost
GRANT USAGE ON *.* TO '10081552'@'localhost' IDENTIFIED BY PASSWORD '*removed the hash' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES ON `10081552`.* TO '10081552'@'localhost' |
2 rows in set (0.00 sec)
mysql>所以我确信这是我做错了什么,但是谁能告诉我为什么我不能创造任何东西。正如我之前所说的,我是命令行的新手,但不是mysql或一般数据库的新手。
发布于 2013-12-08 01:38:56
我检查了权限,它们看起来都很好
对于你想做的事情,特权是不好的,。您的user 10081552@localhost的GRANT清楚地表明,它在名为10081552的数据库中只有具有这些权限
GRANT ... ON `10081552`.* TO '10081552'@'localhost'
^^^^^^^^^^^^因此,您可以在该特定数据库中成功创建表,例如
CREATE TABLE hello_world(id INT); 但是你不能创建新的数据库。
发布于 2015-07-11 14:20:16
要创建数据库,必须使用root用户名和口令
https://stackoverflow.com/questions/20444053
复制相似问题