我使用的是 Windows 7。我已经下载mysql-5.5.16-win32.zip
并安装了它。我成功启动了 MySQL 服务器,但出现此错误:
C:\Program Files\Mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.16 MySQL Community Server (GPL)
mysql> select user, host, password from mysql.user;
ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user
'
mysql> mysql -u root -p
-> select user, host, password from mysql.user;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
-u root -p
select user, host, password from mysql.user' at line 1
mysql> mysql -u root -p root
-> select user, host, password from mysql.user;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
-u root -p root
select user, host, password from mysql.user' at line 1
mysql>
如何设置所需的权限,从 Windows 到 mysql 表用户?