拒绝用户更改命令
Alter command denied to user
我运行 spring启动并尝试生成数据库,我有一个访问问题
数据库已创建但未创建外键
所以我完成了:
GRANT ALL ON *.* TO 'dbuser@localhost';
flush privileges;`
启动 spring 引导应用程序,但收到有关更改拒绝 dbuser 的错误
ALTER command denied to user 'dbuser'@'localhost' for table 'room_payment'
2015-07-16 12:04:28.099 ERROR 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: alter table vehicle add constraint FK_2k13lq037sx9358mhlf9gfmsc foreign key (model_modelId) references model (model_id)
2015-07-16 12:04:28.100 ERROR 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : ALTER command denied to user 'dbuser'@'localhost' for table 'vehicle'
2015-07-16 12:04:28.102 INFO 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000232: Schema update complete
引用错误:
GRANT ALL ON *.* TO 'dbuser@localhost';
^----------------^
由于引用了整个内容,所以这只是一个用户名。你要
GRANT ALL ON *.* TO 'dbuser'@'localhost';
^-^
相反。注意额外的引号。
我运行 spring启动并尝试生成数据库,我有一个访问问题
数据库已创建但未创建外键
所以我完成了:
GRANT ALL ON *.* TO 'dbuser@localhost';
flush privileges;`
启动 spring 引导应用程序,但收到有关更改拒绝 dbuser 的错误
ALTER command denied to user 'dbuser'@'localhost' for table 'room_payment'
2015-07-16 12:04:28.099 ERROR 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: alter table vehicle add constraint FK_2k13lq037sx9358mhlf9gfmsc foreign key (model_modelId) references model (model_id)
2015-07-16 12:04:28.100 ERROR 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : ALTER command denied to user 'dbuser'@'localhost' for table 'vehicle'
2015-07-16 12:04:28.102 INFO 4550 --- [ main] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000232: Schema update complete
引用错误:
GRANT ALL ON *.* TO 'dbuser@localhost';
^----------------^
由于引用了整个内容,所以这只是一个用户名。你要
GRANT ALL ON *.* TO 'dbuser'@'localhost';
^-^
相反。注意额外的引号。