开发者

Why is my permission denied when I try to create a MySQL database?

I am root user on my computer, 开发者_如何学JAVAbut when I use the command:

mysql> CREATE DATABASE foo;

it gives me error:

CREATE: Permission denied


It's because your user doesn't have the CREATE privilege. As the root user, try this:

GRANT CREATE ON *.* TO 'user'@'hostname';


It doesn't matter who are you for the system, if you want to login in mysql as root you have to do it explicitly:

mysql -u root –p
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜