MYSQLDUMP-D: Export only table structure, without data export complete database data without table structureMYSQLDUMP-T: Export data only, without table structureWorkaround:Mysqldump-t in the original database, only the table data is exported toAnd
How to find the relationship between two tablesanalysis steps: # 1 , first stand in the angle of the left table to find whether the left table of multiple records can correspond to a record of the right table, if so, prove a field of the left table
Welcome to the big Data and AI technical articles released by the public number: Qing Research Academy, where you can learn the night white (author's pen name) carefully organized notes, let us make a little progress every day, so that excellent
1. Create DATABASE Database-name2. Deleting a database Drop DB dbname3. Creating a new Table CREATE table tabname (col1 type1 [NOT NULL] [primary key],col2 type2 [NOT NULL],..)To create a new table from an existing table:A:CREATE table tab_new like
MySQL Slow query:Check if log on slow query is turned on:
Show variables like ' log_slow_queries ';
View SQL that is slower than how many seconds are logged to the log file:
Show variables like ' long_query_time ';
Configure Logging
mysql5.7 Version Installation steps1, in the MySQL installation directory to create a new My.ini file, paste the following content, the content of MySQL according to the directory and data storage directory modified to the actual path in their own
MySQL basic command
SQL featuresDML(数据操作语言):用于检索或修改数据。DDL(数据定义语言):用于定义数据的结构,如创建、修改或者删除数据库对象。DCL(数据控制语言):用于定义数据库用户的权限。
View Databaseshow databases;
Working with databasesuse test1;
View tables in the databaseshow tables;
View table
MARIADB is installed by default in CentOS7, this is the branch of MySQL, but in order to need it, it is necessary to install MySQL in the system, and after the installation is complete, you can overwrite the mariadb directly.1. Download and install
1. MySQL database basics, 1. mysql database1. MySQL database Basics
Display the current server version select version ();
Display the current date and time select now ();
Displays the select user () of the current USER ();
View database show
Binlog2sql restores MySQL misoperations.
You can use SQL statements similar to flashback or reverse operation Generation Based on binlog in MySQL to restore data deleted by misoperation in MySQL database. This is a very practical function in MySQL.
MySQL SQL statement analysis and query optimization details, mysqlsql
How to obtain SQL statements with performance problems
1. Obtain SQL statements with performance problems through user feedback2. Obtain SQL statements with performance problems
MySQL common storage engine introduction and parameter settings tuning, mysql Tuning
MyISAM
Features:1. Concurrency and lock level2. Repair of Table CorruptionCheck table tablenameRepair table tablename3. Index types supported by MyISAM tables①
MySQL series-Chapter 1: MySQL introduction and installation, mysql Chapter 11. Database Introduction1. What is Database? ''
Simply put, a data warehouse is organized and stored according to a certain data structure , we can use a variety of methods
MySQL database Constraints
Database constraints:A constraint is a data validation rule enforced on a table. It is mainly used to ensure data integrity in the database.In addition, when the data in the table is mutually dependent, the related data
Enable and view mysql bin-log and mysqlbin-log
[root@VM_0_7_centos data]# vim /etc/my.cnf [root@VM_0_7_centos data]# vim /etc/my.cnf [root@VM_0_7_centos data]# /etc/init.d/mysqld restartShutting down MySQL.... SUCCESS! Starting MySQL. SUCCESS! [root@
Mysql5.7.21 utf8 encoding problem and solution in Mac environment, mysql5.7.21utf8
1. Goal: to change the character_set_server value of mysql from latin1 to utf8
Temporary: SET character_set_server = utf8.
Permanent: to change the configuration
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