[Sql]mysql guidelines (finishing ...)

Source: Internet
Author: User

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 ...)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.