I am trying to make a read only and a full privledge admin user to my database with the following code:
DROP USER IF EXISTS 'readonly'@'localhost';
CREATE USER 'readonly'@'localhost' IDENTIFIED BY 'Readonly1934@';
GRANT SELECT ON bank_assignment.* TO 'readonly'@'localhost';
DROP USER IF EXISTS 'admin'@'localhost';
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin2131@';
GRANT SELECT, INSERT, DROP, ALTER ON bank_assignment.* TO 'admin'@'localhost';
The first user made on its own works fine, but when I add another user it gives me a command out of sync error. I've tried also flushing privileges before and after. Same eror. Does anybody know why?
mariadb
command-line tool instead and see if that works for you.