给mysql 创建用户过程:
1.进入mysql cmd下
2.输入密码:123
3.选择使用的数据库:use myeshop
4.创建新用户
grant usage on *.* to 'cctvsearch'@'192.168.112.52' identified by 'searchcctv@#$%' with grant option;
5.给创建的用户授权
/*
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON tablename.* TO 'myeshop'@'localhost' IDENTIFIED BY 'userpassword';
*/
GRANT SELECT ON *.* TO 'cctvsearch'@'192.168.112.52' IDENTIFIED BY 'searchcctv@#$%';
6.生效授权
FLUSH PRIVILEGES;