Table structure
One DB for a folder.
One table two files The frm is a table structure, and IBD is the storage data
Connection layer:
Sock
Ip
SQL Layer:
Storage tiers:
- MY.CNF Read Order
- Observing the startup process (data directory)
- 授权用户(设密码)- 查看用户权限- 查看mysql版本(3种\s; show states;\)- 建库 建表 插入数据- 查看表结构(字段/及建表语句)- 查询某几列- 查看正在执行的sql(show processlist)- server/client字符集- 查询库的最大连接数- 查询库的slow log是否开- 查看库的大小- 库的数据目录(1dir/per库+2个文件/per表)- 查看建表语句show create database test;- 查看用户权限show grants- 关闭mysqlmysqladmin shutdown
MySQL Daily Maintenance
InitializationDB:(5.6) mysql_install_db:mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/--user=mysql(5.7) mysqld:mysqld--initialize--user=mysql--basedir=/usr/local/mysql-5.7.17--datadir=/usr/local/mysql-5.7.17/dataMysqld_safe: StartMySQL(Msyql.server-->Mysql_safe-->Mysqld:/usr/local/mysql/bin/mysqld_safe&Recover Password:/usr/local/mysql/bin/mysqld_safe--skip-grant-table&mysqladminSet Password:/usr/local/mysql/bin/mysqladmin-U root Password' 123456 ';Change Password:mysqladmin-uroot-p123456 Password' maotai123 '; (SQLStatement cipher functions):Update Mysql.user Set Password=password (' New password ')whereUser=' Root '; FlushPrivileges;
[Sql]mysql guidelines (finishing ...)