MySQL create read-only user


/usr/share

mysql -u root -p

CREATE USER user_name@’localhost’;

SET PASSWORD FOR user_name = PASSWORD (‘password‘);

GRANT SELECT ON database_name.table_name TO user_name;

quit;

Show user list:

select User,Hostname,Password from mysql.user;

View original post