mysql putty,Mysql和Putty – ERROR 1044(42000):拒绝用户访问

我在命令行级别的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或数据库.

解决方法:

I checked the privileges and they seem fine

对于您正在尝试的操作,特权并不合适.您的用户的GRANT 10081552 @ localhost清楚地显示它仅在名为10081552的数据库中具有这些权限

GRANT ... ON `10081552`.* TO '10081552'@'localhost'

^^^^^^^^^^^^

因此,您可以在该特定数据库中成功创建表,例如

CREATE TABLE hello_world(id INT);

但是你不能创建新的数据库.

标签:mysql,database,putty,database-connection

来源: https://codeday.me/bug/20190703/1366849.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值