a****s 发帖数: 47 | 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? | m*****e 发帖数: 4193 | 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,
| w**********k 发帖数: 1135 | 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'
| a****s 发帖数: 47 | 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用户设口令,所以应该没有理由第二条指令不成功。
| d*o 发帖数: 108 | 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.
| a****s 发帖数: 47 | 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.
|
|