Objective
A few days to take a time to "high-performance MySQL" looked at the index is very important, and then summed up to consolidate knowledge. This article uses the InnoDB storage engine as an index. Because this article does not say that the
log in and exit MySQLMysql-h-p-u-P-E-H Specify Host name-P Specify MySQL server port-U Specify user name-P means login password-e-Connect SQL statementsCreate user1.create user wing;Create user [email protected] ' localhost ' identified by ' 12345 ';
One, MySQL data type
The type of data field defined in MySQL is important for database optimizationMySQL supports multiple types and can be broadly divided into three categories: numeric, DateTime, and string (character) types
Second,
First, the approximate operation procedureEnvironment Introduction:Os:center OS6.5mysql:5.6 version 1. Turn off the firewallView firewall Status: Service iptables status This means that it is not closed.Run the following command to turn off
1. Statement: SELECT @rownum: [email protected]+1 as rownum, orderstate.*From (SELECT @rownum: =0) R, Orderstate;Execution Result:2. Revelation: Through this operation I am more aware that the view is the use of SQL queries using similar outer joins,
MySQL concurrency update common scenarios optimistic lockselect * from tab1 where id = ?;update tab1 set col1 = ? where id = ? and version = ?;
Disadvantages
May fail to update under high concurrency, so need to retry
1 SQL991.1 SQL99 syntaxSelect Query List from [ connection Type ] Join on join condition where filter condition;
Connection type:
Internal connection: Inner
External connection:
Left Outer connection: outer
Right
Tools/Materials
Windows operating system
MySQL Database
Method/Step
1Use the Win+r shortcut key to open the DOS command window and locate the bin directory under the MySQL installation directory, such as D:\Program
1. Operation of the database remember to add a semicolon [;] End CREATE DATABASE [DB name]; Drop databse [database name];use [database name]; Select Database//2. The Operation//field name of the data table is ID, name, age these ...//unsigned
First, the installation method1.msi2.zipHere we use the MSI bar, just practice words, a lot simplerSecond, MSI installation1. Click on the installation file and click Next on the Installation Wizard that appears. 2. Agree to the MySQL User
System Database :INFORMATION_SCHEMA: Virtual library, mainly stores the information of some database objects in the system, such as user table information, column information, permission information, character information, etc.Informance_schema:
1, uninstall mariadb, or install MySQL will appear conflict2. Add the official Yum sourceTake CENTOS7 installation mysql5.6 as an example:Create and edit a Mysql-community.repo fileVi/etc/yum.repos.d/mysql-community.repoPaste the following in and
INT (m), M is the tube of what use?As an extension to the Ansi/iso SQL92 standard, MySQL also supports the integer types TINYINT, Mediumint, and BIGINT listed in the table above. Another extension is that MySQL supports arbitrarily specifying a
1. Change the root passwordMysqladmin-uroot password ' yourpassword '2. Remote Login to MySQL serverMysql-uroot-p-h192.168.137.10-p33063. Querying the Databaseshow databases;4. Enter a databaseUse DatabaseName;5. List the tables in the databaseShow
The syntax for the aggregation operation is as follows:--SELECT [field1,field2,...... fieldn] Fun_name-From TableName--[WHERE where_contition]--[GROUP by Field1,field2,...... fieldn--[with ROLLUP]]--[Having where_contition]--The following
Redo log (redo log)Preface: The difference between the bin log and the InnoDB log file in MySQL has been unclear, and there is always a question in the mind binlog log files can be used forLog backups of the database have been restored, and a redo
1 Basic INTRODUCTION to constraint 1.1 constraints
A restriction that restricts the data in the table to ensure accuracy and reliability in the table.
1.2 Classification of constraints
NOT NULL: non-null constraint.
A comprehensive technology for MySQL optimization, mainly includingA: Rationalization of table Design (3NF compliant)B: Add appropriate index (index) [Four kinds: normal index, primary key index, unique index unique, full-text index]C: Sub-table
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