I've created database, for example 'mydb'.
(我创建了数据库,例如'mydb'。)
CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'myuser'@'%' IDENTIFIED BY PASSWORD '*HASH';
GRANT ALL ON mydb.* TO 'myuser'@'%';
GRANT ALL ON mydb TO 'myuser'@'%';
GRANT CREATE ON mydb TO 'myuser'@'%';
FLUSH PRIVILEGES;
Now i can login to database from everywhere, but can't create tables.
(现在我可以从任何地方登录到数据库,但无法创建表。)
How to grant all privileges on that database and (in the future) tables.
(如何授予该数据库和(将来)表的所有权限。)
I can't create tables in 'mydb' database. (我无法在'mydb'数据库中创建表。)
I always get: (我总是得到:)
CREATE TABLE t (c CHAR(20) CHARACTER SET utf8 COLLATE utf8_bin);
ERROR 1142 (42000): CREATE command denied to user 'myuser'@'...' for table 't'
ask by marioosh translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…