同じユーザ名でもアクセス元が違うと別ユーザとみなされる。メールアドレスのように@後ろまで含めてユニークユーザと考えるべし。
hoge@localhost [email protected]
select User,Host from mysql.user;
select * from mysql.user select * from mysql.user wher User='username'
create user USER_NAME
CREATE USER 'NEW_USER'@'localhost' IDENTIFIED BY '********'; GRANT SELECT , INSERT ,UPDATE ,DELETE ON * . * TO 'NEW_USER'@'localhost'; GRANT ALL ON DBNAME.* TO 'NEW_USER'@'localhost';
set password for 'NEW_USER'@'%'=PASSWORD('xxxx');
GRANT SELECT,INSERT,UPDATE,DELETE on wordpress.* TO 'dbuser'@'localhost' IDENTIFIED by 'hoge';