<b> Create user in MySQL with readonly right</b> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT SELECT, SHOW VIEW ON  DBName.* TO 'username'@'localhost';