Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 xampp。我想将 mysql 与 netbeans 连接。我在服务选项卡中从数据库创建新连接时测试了我的连接。我得到连接成功的消息。但是在尝试创建数据库时我得到了这个错误
access denied for user"@'localhost' to database 'student'
对于 mysql
撤销权限
revoke all privileges on *.* from 'student'@'localhost';
然后根据需要授予适当的权限:
grant SELECT,INSERT,UPDATE,DELETE ON `db`.* TO 'student'@'localhost';
在您的情况下,您可能想要
GRANT ALL PRIVILEGES ON *.* TO 'student@localhost';
最后,冲洗:
flush privileges;