grant select on xoms_prod.* to 'kzcf'@'%' identified by '123456';
赋权
多权限就 grant select,update,delete on xoms.....
flush privileges;
然后这个语句保存权限
show grants for kzcf; kzcf就是用户名
那个 %号表示所有机器都能访问
==================在navicat-SQL执行界面,执行下面这条SQL语句
GRANT Select ON *.* TO reader@"%" IDENTIFIED BY "fotireader"
创建数据库服务账号权限
-- GRANT all PRIVILEGES ON *.* TO 'ttx_admin'@'%' identified by '4LJChC0CqPVeuCs4' WITH GRANT OPTION;、
创建数据库账号的读 改 删
-- GRANT select,update,delete ON `xwms`.* TO 'ttx_data'@'%' identified by 'lSfFfq1JTKcV18y8' WITH GRANT OPTION;
创建数据库账号的只读
-- GRANT select ON `wms`.* TO 'cus_read'@'%' identified by 'AofccLhu4M5QQZ01' WITH GRANT OPTION;
创建wms数据库的所有权限
-- GRANT all PRIVILEGES ON `wms`.* TO 'cus_admin'@'%' identified by 'dkwh1EfOpmkARdnM' WITH GRANT OPTION;
更改root账号,访问限制,限制只允许192.168.1.* 网段的ip访问
RENAME USER `root`@`%` TO `root`@`192.168.1.%`;
刷新权限功能表,让权限生效
FLUSH PRIVILEGES;
mysql linux 冷备份数据库脚本
mysqldump -uroot -ptingto --databases xwms > /home/ttx/bin/sqldumps/xwms-`date +"%Y%m%d_%H%M%S"`.sql