mysql 远程权限 以及主键 索引等创建
2017-12-22 11:35
281 查看
只要这两句就可以
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
use mysql;
update db set host = '%' where user = 'root';
flush privileges;
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option; 不设置密码 这句可以不要identified by 'password'
flush privileges; 修改生效 必须要的一句话
添加远程用户admin密码为password
grant all privileges on *.* to admin@localhost identified by 'password' with grant option
grant all privileges on *.* to admin@"%" identified by 'password' with grant option
ALTER TABLE `tbl_trnvs_idcard` ADD UNIQUE INDEX IndexName(`ic_number`); 建立唯一键
ALTER TABLE `tbl_trnvs_idcard` ADD INDEX index_name ( `ic_number` ) 建立索引
ALTER TABLE `tbl_sys_log_on` ADD INDEX index_name ( `log_code` ) 建立索引
grant all privileges on *.* to 'root'@'%' with grant option;
flush privileges;
use mysql;
update db set host = '%' where user = 'root';
flush privileges;
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option; 不设置密码 这句可以不要identified by 'password'
flush privileges; 修改生效 必须要的一句话
添加远程用户admin密码为password
grant all privileges on *.* to admin@localhost identified by 'password' with grant option
grant all privileges on *.* to admin@"%" identified by 'password' with grant option
ALTER TABLE `tbl_trnvs_idcard` ADD UNIQUE INDEX IndexName(`ic_number`); 建立唯一键
ALTER TABLE `tbl_trnvs_idcard` ADD INDEX index_name ( `ic_number` ) 建立索引
ALTER TABLE `tbl_sys_log_on` ADD INDEX index_name ( `log_code` ) 建立索引
相关文章推荐
- mysql索引总结----mysql 索引类型以及创建
- mysql基础:6、mysql创建主键和索引
- mysql索引总结----mysql 索引类型以及创建
- mysql:索引介绍和各种索引解释以及创建语句
- MySQL索引类型以及创建
- mysql索引总结----mysql 索引类型以及创建
- centos7下使用yum安装mysql并创建用户,数据库以及设置远程访问
- mysql 创建 主键索引 唯一索引 全文索引 多列索引 添加索引
- mysql索引总结----mysql 索引类型以及创建
- mysql索引总结----mysql 索引类型以及创建
- 详解mysql索引总结----mysql索引类型以及创建
- mysql的创建索引以及作用
- MySql创建本地用户和远程用户 并赋予权限
- mysql索引总结----mysql 索引类型以及创建
- mysql索引总结----mysql 索引类型以及创建
- mysql索引优缺点以及创建的时机
- mysql索引总结----mysql 索引类型以及创建
- mysql索引总结(1)-mysql 索引类型以及创建
- linux mysql 创建一个新用户以及设权限密码
- MySql创建本地用户和远程用户 并赋予权限