avatar
a*s
1
hi, I started the mysql server, and type bin/mysqlshow,
it gives me following result:
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
So far so good.
When I type bin/mysqlshow mysql,
it gives me error:
bin/mysqlshow: Access denied for user: '@localhost' to database 'mysql'
What is wrong?
avatar
m*e
2
You don't have the privilege to access this database. This is the
management database of mysql.

'mysql'

【在 a****s 的大作中提到】
: hi, I started the mysql server, and type bin/mysqlshow,
: it gives me following result:
: +-----------+
: | Databases |
: +-----------+
: | mysql |
: | test |
: +-----------+
: So far so good.
: When I type bin/mysqlshow mysql,

avatar
w*k
3
按他写的情况看,他是在UNIX的root身份下输入的命令,由于没有指定
mysql的用户,是以root的身份访问的mysql,并且按前一条指令可以执行成功看,
他还没有给mysql的root用户设口令,所以应该没有理由第二条指令不成功。

【在 m*****e 的大作中提到】
: You don't have the privilege to access this database. This is the
: management database of mysql.
:
: 'mysql'

avatar
a*s
4
Now I tried mysqlshow -u root mysql, it works.
Before that, I added (Host, User) = ("%","root), I am not sure if
it is this change that made the above code working.

【在 w**********k 的大作中提到】
: 按他写的情况看,他是在UNIX的root身份下输入的命令,由于没有指定
: mysql的用户,是以root的身份访问的mysql,并且按前一条指令可以执行成功看,
: 他还没有给mysql的root用户设口令,所以应该没有理由第二条指令不成功。

avatar
d*o
5
You should do this:
bin/mysqlshow -u root -p mysql
then enter your password when asked. I supposed you are the root. otherwise,
you just change the 'root' to your userID.

【在 a****s 的大作中提到】
: Now I tried mysqlshow -u root mysql, it works.
: Before that, I added (Host, User) = ("%","root), I am not sure if
: it is this change that made the above code working.

avatar
a*s
6
I checked, you are right//admire

【在 d*o 的大作中提到】
: You should do this:
: bin/mysqlshow -u root -p mysql
: then enter your password when asked. I supposed you are the root. otherwise,
: you just change the 'root' to your userID.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。