How to create a read-only MySQL user?

mysql -u root -pPrevious💾 SQL – คู่มือและตัวอย่างใช้งานNextUse one of the following commands to grant ALL PRIVILEGES to a MySQL
Last updated

mysql -u root -pLast updated
CREATE USER 'new_user'@'%' IDENTIFIED BY 'password_secret';GRANT SELECT ON database_name.* TO 'new_user'@'%';GRANT SELECT ON database_name.* TO 'report'@'host_name or IP_address';FLUSH PRIVILEGES;
SHOW GRANTS FOR 'report'@'host_name or IP_address';