Master-slave replication is not more than a server! , one change, the other changes, the content is actually the same!Principle:Operation on the database will generate a file, Binlog (binary file), from the server configuration Relaylog file, used
First, verify that the original host has MySQL installed:here the main thing is to run sudo netstat-tap | grep mysql command to see if there is a MySQL port, if not add sudo, because the permissions cannot be executed smoothly: $ netstat -tap |
Web systems, the most important thing is the security and integrity of the database.It 's important to do a regular backup, so don't be lazy on this issue. If your important data is lost, it will make you cry without tears.export table structure and
Recently the company asked to test the performance of the database, went online to check some of the bulk of the code to insert data, found that there are several different usages, inserting the same data time is also differentOther first not to say,
MySQL Import database has 2 methods, a simple method, directly using the Navcat run SQL file, know that your SQL file directly import OK, but I import the error, the reason, now do not know, the second is the CMD import, this method is a bit
1. Download the installation package: Http://mirror.neu.edu.cn/mysql/Downloads/MySQL-5.5/mysql-5.5.40-linux2.6-x86_64.tar.gz 2. Unzip the tar vxzf mysql-5.5.40-linux2.6-x86_64.tar.gz#cd mysql-5.5.40-linux2.6-x86_64MV Mysql-5.5.40-linux2.6-x86_64/usr/
Before learning SQL Server, the SQL language is quite familiar with, ready to learn MySQL, installed MySQL, in MySQL command line shell (Command Prompt) interface, enter common SQL statements, press ENTER, a little reaction is not, Later found at
Assume that the database has three indexed fields, such as1. Database fields2. Index FieldThe leftmost index is " primary key index " and the other two columns are " normal index "3. Here are the query cases where different indexed field
explain SyntaxEXPLAIN SELECT ... Variant: 1. EXPLAIN EXTENDED SELECT ... "Decompile" The execution plan into a SELECT statement, run show WARNINGS to get the query statement 2 optimized by the MySQL optimizer. EXPLAIN Partitions SELECT ... Explain
MySQL Types to Java Types for Resultset.getobject ()
MySQL Type Name
Return value GetColumnClassName of
returned as Java Class
BIT(1)(New in MySQL-5.0)
BIT
java.lang.Boolean
MySQL wildcard charactersThe pattern match for SQL agrees that you use "_" to match any single character, while "%" matches the random number of characters (containing 0 characters). In MySQL, the default mode of SQL is to ignore uppercase and
Section I. connection to the database1. Start the database service650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/50/C8/wKiom1RitYHxoGBgAADQf9E_mvg729.jpg "title=" 1.png " alt= "Wkiom1rityhxogbgaadqf9e_mvg729.jpg"/>which MySQL is
section IIMysqlAdd new users 1. The show databases command is used to display all databases. 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/50/D9/wKioL1RiwuCBB7dFAADZWsCudZc837.jpg "title=" 1. PNG "alt="
SQL Common statements: First, common keywords:1.distinct: Filter RepeatSelect distinct create_user_name from Bms_project; In this case, it is necessary to use the distinct filter out duplicates.2.count: StatisticsSelect COUNT (*) from Bms_project;
Analysis of mysql replication principles and functions)Replication Principle 1. The master writes data to the binlog. 2. slave enables two threads: I/O thread and SQL thread. 3. The slave I/O thread connects to the master and reads the binlog file
Mysql advanced cursor
What is a cursor? The select statement may obtain n statements at a time, so the cursor can obtain a record in the select statement at a time. Move down every time one is obtained! Complicated logic can be implemented!
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