我有SQL用户名是BOOKSQL
登入以后执行
GRANT ALL PRIVILEGES
ON    *.*
TO    'BOOKSQL'@'localhost'
WITH  GRANT OPTION
显示Access denied for user 'BOOKSQL'@'localhost' (using password: YES)
为什么错了我看书做的

解决方案 »

  1.   

    GRANT ALL PRIVILEGES 
    ON    *.* 
    TO    `BOOKSQL`@`%`
    WITH  GRANT OPTION 
    注意引号是反引号`不是单引号'
      

  2.   

    标点错误 grant all privileges on *.* to root@`%`;
      

  3.   


    你执行这个命令是用的哪个用户? booksql 还是 root ?
    你可以通过 select current_user(); 查看你当前的登录账号。 
    试用root 登录来进行grant 操作。
      

  4.   

    应该是标点错了。用ESC下面那个符号。'`'
      

  5.   

    When specifying quoted values, quote database, table, column, and routine names as identifiers, using backticks (‘`’). Quote hostnames, usernames, and passwords as strings, using single quotes (‘'’). 
      

  6.   

    用 select user()获得当前用户,然后show grants;看是否有权限执行grant操作。。