ObjectiveLearn MySQL TodayThe primary key, also called the main code, is a combination of one or more columns in a table. A PRIMARY key constraint requires that the primary key's data is unique and is not allowed to be empty. A primary key uniquely
In MySQL online environment we generally only open binary Log,slow log, and sometimes we need to see the general log? Since the log records all requests, opening the logs will definitely put a lot of pressure on the disk, and the IO capability is
Section I: Introduction to Stored procedures and functionsStored procedures and functions are a collection of SQL statements that are defined in the database, and then call these stored procedures and functions directly to perform the definedof SQL
Days to migrate the Windows project to Linux, and then log on to the user table can not find the error message.Check that the name of the table in the discovery database is M_user, and then remembered that it was a case.Find the cause of the problem
One, String type
Type
Range
Description
Char (N) [binary]
n=1~255 bytesBinary: Distinguish case
Fixed length
Std_name Cahr (+) NOT NULL
VarChar (N) [binary]
n=1~255
In the process of creating the installation of the micro-engine, for the fourth stepCreate a remote login user and authorize> Grant all privileges the database.* to [email protected]' 127.0.0.1 ' identified by ' 123456 ';The above statement
View current configurationShow VARIABLES like '%max_allowed_packet% ';Modify methodYou can edit the my.cnf to modify (under Windows My.ini) and modify it in the [Mysqld] section or in the MySQL server configuration section. Under [mysqld],
Reprinted from:MySQL Transaction ISOLATION level detailedThe SQL standard defines a Class 4 isolation level, which includes specific rules to define which changes within and outside the transaction are visible and which are not. Low-level isolation
1, the virtual machine installs the MySQL server, the host computer uses the Navicat tool and the Java code to access MySQL respectively, the Network diagram is as follows:2. Check the server status of MySQL as follows:3. View the database and data
transactions and stored proceduresTransaction ManagementThe concept of a transactionA transaction is a set of operations against a database, which can consist of one or more SQL statements, and the operation of the same transaction has the
basic operations for databases and tablesDatabase BasicsCreate a databaseis to partition a piece of data in a database system.CREATE DATABASE Itcast;View DatabaseSHOW CREATE database name;Modify DatabaseALTER database name DEFAULT CHARACTER SET
Two tables, T1 and T2, have only one field, id int. Insert 1000 records each, and run the following statement:ExplainSELECT t1.id,t2.id from T1 INNER joins T2 on T1.id=t2.idShown below:The explanations are as follows:With the help of explain, you
Li Wu:Learn to think more, honouring teachers save Thanksgiving. Leaf See root Three return one, living water Qingyuan hidden in zero.Meekness The Lord of Conscience, Haoyuedangkong the King of Freedom. Willing to give the most ascetic no regrets,
MySQL installation files are divided into two types, one in MSI format and one in ZIP format. If the MSI format can be directly clicked on the installation, according to the installation prompts it to install (I believe you can read English tips),
No more nonsense, go straight to the chase.#数据准备Class Table class:CREATE TABLE' class ' (' Class_no ' )int(2) unsigned Zerofill not NULLAuto_increment COMMENT'class Number', ' class_name 'varchar( -)CHARACTER SETUtf8 not NULLCOMMENT'class name',
A: Test environment introductionThe master-slave replication test environment is Ubuntu+mysql5.7,master server IP is 192.168.71.135,slave server IP is a 192.168.71.137,ubuntu environment that is cloned from a server that has a configured environment.
Because most of us use InnoDB, so this blog is mainly based on InnoDBB + Tree (image from Network)B + Tree graph from Network1. The difference between a clustered index and a nonclustered indexClustered index: Leaf node contains complete data
Basic mysql operations,
Database and table operations
Add:
Create database: create database mpc [charset utf8]; (sets the database encoding)
Create a data table: create table [if not exists] table Name (Field 1, Field 2... [Index 1, index 2 ...,
Two types of Mysql stored procedures with and without return values, mysql stored procedures
Process 1: With return values:
1 drop procedure if exists proc_addNum; 2 create procedure proc_addNum (in x int, in y int, out sum int) 3 BEGIN4 SET sum =
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