创建各种需要的mysql用户
1. 创建指定一个数据库的读、写账户
student(指定数据库)、zsan(账户)、%(ip地址)、passwo(密码)
GRANT ALL PRIVILEGES ON student.* TO zsan@'%' IDENTIFIED BY 'passwo';
FLUSH PRIVILEGES;
2.创建所有数据库的只读账户
GRANT SELECT ON *.* TO 'zsan'@'%' IDENTIFIED BY 'passwo' ;
FLUSH PRIVILEGES;
3.创建所有数据库的读、写账户
GRANT ALL PRIVILEGES ON *.* TO 'zsan'@'%' IDENTIFIED BY 'passwo' ;
FLUSH PRIVILEGES;