I have this .sql script I've written which, among other things, creates the DB, creates tables, creates procedures, and sets up users.
Here is a segment of it:
DELETE FROM mysql.user WHERE User = 'fwtrRWW';
DELETE FROM mysql.user WHERE User = 'fwtrRW';
DELETE FROM mysql.user WHERE User = 'fwtrR';
FLUSH PRIVILEGES;
CREATE USER 'fwtrRWW'@'localhost' IDENTIFIED BY 'abc123';
CREATE USER 'fwtrRW'@'localhost' IDENTIFIED BY 'abc213';
CREATE USER ' fwtrR'@'localhost' IDENTIFIED BY 'qwerty';
FLUSH PRIVILEGES;
GRANT ALL ON fwtr.* TO 'fwtrRWW';
GRANT SELECT, INSERT, UPDATE ON fwtr.* TO 'fwtrRW';
GRANT SELECT ON fwtr.* TO 'fwtrR';
I keep getting MySQL error 1133: Can't find any matching row in the user table, despite the fact that SELECT * FROM mysql.User clearly shows that the users are there.
I have tried putting more FLUSH PRIVILEGES in here and there but it doesn't seem to help like it does for others on other forums.
Any ideas what might be wrong?
DROP USERinstead of accessing the users table directly:DROP USER 'fwtrRWW'@'localhost'