MySQL数据库常用操作语法
1. 数据库初始化配置 1.1. 创建数据库 create database apps character set utf8 collate utf8_bin; 创建数据库”app“,指定编码为utf8 1.2. 创建用户 create user 'apps'@'localhost' identified by '12345'; 创建用户apps,密码12345,设定只能从localhost访问本地MySQL create user 'apps1' identified by '12345'; 用户apps1可以从任意的域或主机访问当前MySQL 1.3. 配置用户权限 grant all privileges on apps.* to 'apps'@'localhost'; 赋予用户apps从localhost登陆MySQL时,数据库apps里所有表的全部权限 grant的14个权限 select, insert, update, delete, create, drop, index, alter, grant, references, reload, shutdown, process, file grant select, insert, update, delete, create, drop on CTD.posts to laowang@192.168.1