The previous time in learning the basics of Python, where to operate MySQL, but always error:Mysql_exceptions. Operationalerror: (2002, "Can ' t connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock ' (2)")Baidu for a long time,
First, prepare the experiment MYSQL Replication Environment: MHA has special requirements for MYSQL replication environment, such as each node to open the binary log and the relay log, each slave node must display the Enable its read-only property,
Integrity constraintsconcept: constraints are the same as the width of the data type, which are optional parametersfunction: used to ensure the integrity and accuracy of data between tables and tablesCan be divided into the following types:PRIMARY
Analysis of several scenarios where MySQL indexing will failIndexes do not always take effect, such as the following, which will invalidate the index:1, if there is an or in the condition, it will not be used even if there is a conditional index
Source: http://www.jb51.net/article/125744.htmTest sql:CREATE TABLE ' test ' ( ' id ' int (8) NOT NULL auto_increment, ' name ' varchar (255) is not NULL, ' list ' varchar (255) N OT NULL, PRIMARY KEY (' id ')) INSERT into ' Test ' VALUES (1, '
1, download MySQLOpen MySQL's official website www.mysql.com, found a downloadsClick on it, go to the MySQL download page, there is a MySQL Community Edition at the bottom of the page, and there is a blue link belowClick on this blue link to go to
First, the data type
See: http://www.runoob.com/mysql/mysql-data-types.html
Ii. Types of choice
Plastic >date,time>enum,char>varchar>blob,text
For data types of the same level, it is preferable to select a data type that occupies
Using NavicateUsing commandsBackupMysqldump-hlocalhost -uroot -proot databases > C:\Users\asus008\Desktop\ Mp4\databases.sqlRestoresMysql-hlocalhost-uroot-proot Databases Backing up multiple databasesMysqldump-hlocalhost-uroot-proot--databases OA
MySQL's master-slave replication is the basis for a large-scale MySQL cluster, which is widely used in daily production environments, The MySQL5.6 began to make great progress in MySQL's master-slave replication after the continuous refactoring of
1. The table is as follows:2. Below: Start your Show
1. Check the number of all students who have high grades in the course number "1" than the course number "2";
2, the query average score is more than 60 points of the student's number and
1. Database table operations:
-Start the MySQL server first, open the CMD window in the directory where MySQL is installed, and run MySQL: ' mysql.exe-hlocalhost-p3306-uroot-p123456 ';
-View all databases: show databases; --Create DATABASE
1install MySQL server first download good mysql RPM installation package using RPM command installation: RPM-IVH mysql-server-5.1. the-1. glibc23.i386.rpm command Explanation: I:install V: Show Details H: Show progress bar issue: Display software
Aes_encrypt (Str,key)Returns the result of encrypting the string str with the key key using the Advanced Encryption Standard algorithm, the result of calling Aes_encrypt is a binary string, stored as a BLOB typeAes_decrypt (Str,key) Returns the
1. Pre-conditions, you need to set the server and MySQL time to the East Eight, php.ini and MY.CNF configuration (refer to the previous article)2, go to MySQL client, recommended navicat for MySQL3, first check whether the function of the timer is
Machine standardization: Server hardware configuration (CPU, hard disk, memory, RAID) to be consistentDirectory standardization: MySQL installation directory, storage data directory, log files, etc., on multiple machines to be unified
SQL Server and MySQL have some differences in the concurrent processing of "yes, update, no ., Sqlmysql
"Update if yes, insert logic if no exist" concurrent processing
In sqlserver:
In sqlserver, you can lock a range by serializing the isolation
Mysql -- view,1. view features
When a view comes from multiple basic tables, data cannot be added or deleted.2. Create a view
Although a view can be viewed as a virtual table, it does not physically exist, that is, the database management system
Mysql basics-add, delete, modify, and query, mysql basics-add, delete1. Basic concepts of tables
Each row represents a unique record, and each column represents a field in the record.2. Create a table
Example:
3. view the table structure
(1)
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