这是什么问题? 192.168.4.204就是本机C:\Program Files\McAfee\Network Security Manager\MySQL\bin>mysql -h192.168.4.204 -uroot -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 28799
Server version: 5.0.68-enterprise-nt-log MySQL Enterprise Server (Commercial)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> select version();
+--------------------------+
| version()                |
+--------------------------+
| 5.0.68-enterprise-nt-log |
+--------------------------+
1 row in set (0.00 sec)mysql> use mysql
Database changed
mysql> select host,user from user;
+---------------+------+
| host          | user |
+---------------+------+
| 192.168.4.204 | root |
+---------------+------+
1 row in set (0.00 sec)mysql> grant all privileges on *.* to root@'%' indentified by 'qwerty';
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 'indentified by 'qwerty'' at line 1
mysql>

解决方案 »

  1.   

    grant all privileges on *.* to root@'%' IDENTIFIEDBY by 'qwerty';
      

  2.   

    grant all on *.* to root@'%' indentified by 'qwerty';
      

  3.   

    楼上的都不可以mysql> grant all privileges on *.* to root@'%'  with grant option;
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql> grant all privileges on *.* to root@'%' IDENTIFIEDBY by 'qwerty';
    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 'IDENTIFIEDBY by 'qwerty'' at line 1
    mysql> grant all privileges on *.* to root@'%' IDENTIFIED BY by 'qwerty';
    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 'by 'qwerty'' at line 1
    mysql> grant all on *.* to root@'%' indentified by 'qwerty';
    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 'indentified by 'qwerty'' at line 1
    mysql>
      

  4.   

    mysql> grant all privileges on *.* to root@'%' IDENTIFIED BY 'qwerty';
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql>
      

  5.   

    grant all on *.* to root@'%' identified by 'password';
    注意identified
      

  6.   

    >mysql -h192.168.4.204 -uroot -p
    Enter password: ******用的root上个礼拜还可以,现在突然不行
      

  7.   

    SHOW GRANTS FOR 'root'@'localhost';
    贴结果
      

  8.   

    估计你的权限丢了。http://topic.csdn.net/u/20090515/21/2b3c9a12-d8a5-4bb1-9895-6069cef5aef8.html
    用这个贴子中的方法进去,然后把你自己加入 root@localhost
      

  9.   

    sorry, 刚才在忙,没来看只有'root'@'192.168.4.204' 有grant
    mysql> SHOW GRANTS FOR 'root'@'192.168.4.204';
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | Grants for [email protected]
       |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.4.204' IDENTIFIED BY PASSWORD '*AA1420F182E88B9E5F874F6FBE7459291E8F460
    1' |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    1 row in set (0.02 sec)mysql>
      

  10.   

    你这个连接方法我试过,这是忘记root密码,然后重设root密码。重设密码,用root进去,grant rights 依然不行 
      

  11.   

    'root'@'192.168.4.204所有权限都有嘛
    MYSQL是安装在本机还是远程?
      

  12.   

    mysql> select host,user from user;
    +---------------+------+
    | host          | user |
    +---------------+------+
    | 192.168.4.204 | root |
    +---------------+------+
    1 row in set (0.00 sec)从你这个显示,你的机器上已经没有 root@localhost 了。你可以试一下你当前登录的身份。mysql> select current_user//
    +----------------+
    | current_user   |
    +----------------+
    | root@localhost |
    +----------------+
    1 row in set (0.06 sec)mysql>看一下是什么?然后直接
    SHOW GRANTS
    看一 下。mysql> SHOW GRANTS//
    +---------------------------
    ----------------------------
    | Grants for root@localhost+---------------------------
    ----------------------------
    | GRANT ALL PRIVILEGES ON *.
    E809DDACAF96AF0FD78ED04B6A26
    +---------------------------
    ----------------------------
    1 row in set (0.00 sec)mysql>
      

  13.   

    当前用户
    root@'192.168.4.204'
    所有权限都有,
    就是不能grant all privileges on *.* to root@'%' identified by 'qwerty';
    邪门了。所有测试都是在MySQL Server端,Server IP: 192.168.4.204
    mysql> select current_user;
    +--------------------+
    | current_user       |
    +--------------------+
    [email protected] |
    +--------------------+
    1 row in set (0.00 sec)mysql> show grants;
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | Grants for [email protected]
       |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.4.204' IDENTIFIED BY PASSWORD '*AA1420F182E88B9E5F874F6FBE7459291E8F460
    1' |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    1 row in set (0.00 sec)mysql>
     
      

  14.   


    mysql> select current_user;
    +--------------------+
    | current_user       |
    +--------------------+
    [email protected] |
    +--------------------+
    1 row in set (0.00 sec)mysql> show grants;
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | Grants for [email protected]
       |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.4.204' IDENTIFIED BY PASSWORD '*AA1420F182E88B9E5F874F6FBE7459291E8F460
    1' |
    +-----------------------------------------------------------------------------------------------------------------------
    ---+
    1 row in set (0.00 sec)mysql> grant all privileges on *.* to root@'127.0.0.1' identified by 'qwerty';
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql> grant all privileges on *.* to root@'localhost' identified by 'qwerty';
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql> grant all privileges on *.* to root@'%' identified by 'qwerty';
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql>
      

  15.   

    从结果上看是已经有权限了。试一下 create user  root@'localhost' identified by 'qwerty';
      

  16.   

    可以创建,但不能Grant
    mysql> create user 'root'@'localhost' identified by 'qwerty';
    Query OK, 0 rows affected (0.06 sec)mysql> grant all privileges on *.* to root@'localhost';
    ERROR 1045 (28000): Access denied for user 'root'@'192.168.4.204' (using password: YES)
    mysql>
      

  17.   

    重起服务和系统多次,
    快崩溃了谢谢大虾们关注,我也尝试去问问官方MySQL.