创建数据库时与netbeans的mysql连接出错?

时间:2013-02-15 18:14:22

标签: mysql sql database netbeans

我正在使用xampp.i希望连接mysql与netbeans.i测试我的连接,同时从服务选项卡中的数据库创建新连接。我获得连接成功消息。但在尝试创建数据库时我得到此错误

access denied for user"@'localhost' to database 'student'

1 个答案:

答案 0 :(得分:2)

for mysql

  1. 撤销权限

    revoke all privileges on *.* from 'student'@'localhost';
    
  2. 然后根据需要授予适当的权限:

    grant SELECT,INSERT,UPDATE,DELETE ON `db`.* TO 'student'@'localhost';
    
  3. 在您的情况下,您可能需要

         GRANT ALL PRIVILEGES ON *.* TO  'student@localhost';
    

    最后,冲洗:

        flush privileges;