// This is due to the internal structure of the user table in the mysql database (mysql.user) has many administrative privilege columns that accept a value of "N" or "Y", but not a NULL value. Without assigning these values ββin the syntax for adding users using the INSERT method, they will provide null values ββin the table and, therefore, error 1364 will occur. // instead of using the syntax, GRANT will not give administrative privileges to the user mysql> use mysql;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE -> ON database.* //for all tables in DATABASE database -> TO 'user'@'localhost' -> IDENTIFIED BY 'password';
// user will be created
source share