MySQL master-slave replication is asynchronous replicationCompleted by 3 threads between master and slaveMaster I/O--Main LibrarySlave I/O--Standby librarySlave SQL--standby libraryYou must open the Binlog of the main library1.slave I/O connects to
1 SQL Commit, MySQL server first check the size of SQL by parameter max_allowed_packet , if exceeded, direct prompt MySQL go away.2 server from the store will need to modify the data page load into memory (subject to innodb_buffer_pool_size).3 Write
Open DOS window today, the amount of DOS window text becomes very small, and the naked eye can not see clearly, want to modify the size of the font in the property, but found that can not change, as follows:As shown, the size of the font cannot
Write about the use of Union today and something to be aware of.Union: The union means to merge two or more query results together.Requirements: Two queries must have the same number of columnsRecommendation: The type of column can be different, but
Left JOIN connection:Select column 1, column 2, column n fromTableA left join TableB On tableA. Column = TableB. Column (Normal is a foreign key column) [Here the table is connected to a large table, completely as a plain watch]Where,having,group by
Read a blog, feel the work is worth learning, the original text as follows:Accident descriptionIn a project, on-line a new function, a continuous customer service to our response, there are users of individual props up to 4.2 billion, but there has
Mysql mysql_connect($db _host,$db _user,$db _password); mysql_select_db($dn _name); $result=mysql_query("Select ' Name ' from ' The Users ' WHERE ' location ' = '$location‘"); while($row=Mysql_fetch_array($result,Mysql_assoc)) { Echo $row[' Name '];
Ibatis is the predecessor of MyBatis, which is an open source persistence layer framework. At its core, sqlmap--maps the entity bean to the relational database, separating the business code from the writing of the SQL statement. Ibatis is the
The reason why MySQL is garbled is that there are several reasons:1, stored in the database before the garbled2, stored in the database process garbled3, stored in the database after garbledWant to know where the garbled is very simple, in the
MORE: http://www.webyang.net/Html/web/article_138.htmlMySQL is often used to query specific fields, and occasionally need to show a certain part of the value in a particular field, how to deal with it?Then there are fuzzy queries, if you need to
1. Create a databaseCreate database test; 2. CREATE TABLE student (id int, name char (8), sex char (4));-Create a student table with ID name sex three field 3. View data table fields select columns from student; show CREATE TABLE student;d Escribe
SET @amount = 0;SET @rank = 1;SET @shunxu = 0;SELECT tmp2.id as id,tmp2.name as name,tmp2.amount as amount,tmp2.rank as rankFrom (SELECT tmp.id as id,tmp.name as name,tmp.amount as amount, @shunxu: [Email protected]+1,if (email protected], @rank,
There are 5 Mysql aggregation functions:1, COUNT () Number of records2, max () maximum value3, min () minimum value4, AVG () average5, sum () sumAggregation functions often work with groups.1. Create a groupSelect Name, Max (age) from Stu Group by
1. Selection: SELECT * from table name where condition2. Insert: INSERT into table name (Field 1, Field 2) VALUES (value 1, value 2)3. Delete: Delete from table name where condition4. Updated: Update table name SET field = value Where condition5.
The MySQL version used here is 5.6.23 and is configured with a new MySQL master-slave copy (no data existed before)1. Configure MasterVI My.cnflog-bin=mysql-binserver-id=1innodb_flush_log_at_trx_commit=1sync_binlog=1service mysqld Restart2.
1. Install MySQL Yum Install mysql-server mysql-devel2. Start MySQL// Start // Restart // Stop grep // view MySQL Service status3. Create a MySQL account' 123 '4. Go to MySQLMysql-uroot-p1235. Create an account from the server used to access the
Mysqldecimal and numeric data typesDECIMAL (M, D)
Example: salary DECIMAL (5, 2)In this example, 5 (precision) represents the number of important decimal digits, and 2 (data range (scale) represents the number of digits after the decimal point. In
MySQL engine learning notes
MySQL has the following engines: ISAM, MyISAM, HEAP, InnoDB, and Berkley (BDB ). Note: different versions support different engines. Of course, if you feel that you are indeed highly skilled, you can also use MySQL ++ to
MySQL Stored Procedure
The Mysql stored procedure is actually a function, which can execute multiple SQL statements and create temporary variables.For example, the main functions of the following stored procedure are:(1) create two temporary
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