# Create the user
CREATE USER 'customer'@'%' IDENTIFIED WITH mysql_native_password BY 'secret<secret>';
GRANT SELECT, CREATE TEMPORARY TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON JTELWeb
# Grant the user access to read everything and execute all stored procedures on all DBs
GRANT SELECT ON *.* TO 'customer'@'%';
GRANT SELECT, CREATE TEMPORARY TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON JTELStats*.* TO 'customer'@'%';
GRANT SELECT, CREATE TEMPORARY TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON JTELStats2 ON *.* TO 'customer'@'%';
GRANT SHOW VIEW ON *.* TO 'customer'@'%';
GRANT
# SELECT,Grant CREATEthe TEMPORARYuser TABLES,full CREATEaccess ROUTINE,to ALTER ROUTINE, EXECUTEcustomer db
GRANT ALL ON JTELLogJTELCustomer.* TO 'customer'@'%';
# Make changes active
FLUSH PRIVILEGES; |