服务启动
Ubuntu环境
| 
 | 
 | 
CentOS环境
| 
 | 
 | 
用户相关
mysql库 user表
| 
 | 
 | 
user表中host的含义
| host | 说明 | 
|---|---|
| % | 匹配所有主机 | 
| localhost | 通过unix socket连接 | 
| 127.0.0.1 | 通过tcp/ip, 且只能在本地连接 | 
| ::1 | 支持ipv6, 同127.0.0.1 | 
权限表
| 权限 | 说明 | 
|---|---|
| all | 所有权限 | 
| alter | |
| alter routine | |
| create | |
| create routine | |
| create temporary tables | |
| create user | |
| create view | |
| delete | |
| drop | |
| execute | |
| file | |
| grant option | |
| index | |
| insert | 可以使用create index和drop index | 
| lock tables | |
| process | |
| reload | 使用flush | 
| replication client | |
| replication slave | |
| select | |
| show databases | |
| show view | |
| shutdown | |
| super | |
| update | |
| usage | 无访问权限 | 
数据库相关
建库建表
| 
 | 
 | 
表相关操作
| 
 | 
 | 
索引相关操作
| 
 | 
 | 
系统配置相关
ubuntu环境,系统配置文件/etc/mysql/my.conf
| 
 | 
 | 
开放3306端口
修改/etc/mysql/mysql.conf.d/mysqld.cnf
| 
 | 
 | 
新数据库设置
服务配置
| 
 | 
 | 
建库建表
| 
 | 
 | 
查询
| 
 | 
 | 
优化
| 
 | 
 | 
