MySQL CREATE command denied to user

StackBuck asked:

I have a script system that refuse to be installed because of error that breaks installation.

I tryied to import the data by import the data via .sql file at phpmyadmin and it still cant import.

When i try to menully import the file jcqm.sql its fail and i get this message:

SQL query: – –—-—-—-—-—-—-—-—-—-—- —Table jqcm_import.users
–—-—-—-—-—-—-—-—-—-—- CREATE TABLE IF NOT EXISTS jqcm_import.users ( id INT NOT NULL AUTO_INCREMENT, uuid CHAR
NOT NULL, username VARCHAR NULL DEFAULT NULL, email VARCHAR NULL
DEFAULT NULL, password VARCHAR NOT NULL, role ENUM NOT NULL
DEFAULT ‘USER’, status TINYINT NOT NULL DEFAULT 1, date_created
TIMESTAMP NULL DEFAULT NULL, date_modified TIMESTAMP NULL DEFAULT
NULL, PRIMARY KEY (id), UNIQUE INDEX username_UNIQUE (username
ASC), UNIQUE INDEX uuid_UNIQUE (uuid ASC)) ENGINE = InnoDB
AUTO_INCREMENT = 0 DEFAULT CHARACTER SET = utf8; MySQL said:
Documentation #1142 – CREATE command denied to user ‘xxx’@’localhost’
for table ‘users’

I try to grant some privilegies by do:

GRANT ALL PRIVILEGES ON `costo_jmat`.* TO 'costo_matis'@'localhost'

By using this method:

GRANT ALL on dbname.* to ‘username’@’localhost’ identified by
‘password’

But still, no sucsess!

Here is the installation path: Installation path

Can you please solve this so i can use the script?

My answer:


In your GRANT you specified a database name of costo_jmat. But your import has a database name of jqcm_import. Fix that.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.