MYSQL cross-server data synchronization experience to share the needs of the bitsCN.com project, find some information and manually configure it, and share the experience gained.
(1) master server
Modify the configuration file/etc/my. cnf (my.
Master mysql, master EXPLAIN MySQLexplain
BitsCN.com
Description of the EXPLAIN column:Table: displays the data of this row about which tableType: this is an important column that shows the type used by the connection. The connection types from the
Configuration instance Centos for installing multiple mysql data in CentOS
Note: This document provides two MYSQL instances, multiple instance methods, and so on.
LINUX: centOS6.3 64bit (default system development kit installed)Database 1:MYSQL
Cascade operations for mysql 1. create Table
Create table (
Name char (20) not null,
Id char (20) not null primary key );
2. create Table B
Create table B (
B _name char (20) not null,
B _id char (20) not null,
Constraint foreign key (B
The group_concat function of mysql uses the group_concat function in MySQL. The Complete syntax is as follows:
Group_concat ([DISTINCT] field to be connected [Order by asc/DESC sorting field] [Separator 'delimiter'])
Basic query
Select *
For example, if you configure the mysql environment variable window7 in windows, right-click "computer"-click "properties"-click "Advanced System Settings"-click "environment variable". The following figure shows the configuration:
<>
Steps for mysql to copy table data or table structure to the new table MySQL to copy table data to the new table.
1. MySQL copies the table structure and data to the new table
Create table new_table SELECT * FROM old_table;
2. only copy
Mysql trigger instance Test table 1
DROP TABLE IF EXISTS test; CREATE TABLE test ( id bigint(11) unsigned NOT NULL AUTO_INCREMENT, name varchar(100) NOT NULL DEFAULT '', type varchar(100), create_
Mysql Workbench is a visual database design tool recently released by MySQL AB. This tool is a dedicated tool for designing MySQL databases. It acts as a DBMS and database management system.
When MySQL Workbench is used for batch database update,
Query the last two data records of the mysql database.
There is a mysql database table. the result of querying the last two pieces of data is as follows:
This is the content in the original table:Idname1 ad2 jk3 tre
4 hgv
This is the last two pieces
MySQL Chinese garbled problem occurs when MySQL database is used in the project (Chinese characters have all become ?) Solution:
1. unified project and database coding, the project uses UTF-8, so I unified the database coding into UTF-8
The mysql stored procedure instance shares the code of a mysql stored procedure instance.
Mysql stored procedure
Delimiter $ drop function if exists 'fun _ convert' $ create definer = 'root' @ '% 'function' fun _ convert' (para varchar (255)
MySQL index type summary and usage tips and precautions in the database table, index the field can greatly improve the query speed. Suppose we have created a mytable table:
Create table mytable (id int not null, username VARCHAR (16) not null );
We
Mysql case-sensitivity issues when I was working on enterprise projects, I used oracle databases and mysql for new company projects.
1 in windows, mysql is case-insensitive by default. to make mysql case-insensitive. Change Method
Find the my.
The implementation of LRU in the MySQL cache pool MySQL InnoDB engine is configured with indexes and data cache pools. the LRU algorithm is used to maintain the cache hit rate.
The sequence table list is used as the buffer pool. each data node is
The following is a summary of MySQL character set operation commands that are run in mysql 5.5 command line:
View the character sets supported by MySQL:Show charset;View character set:StatusThe following is more specific:Show variables like
MySQL table names are case-insensitive. by default, MySQL in Linux is case-sensitive. the following settings enable MySQL to make table names case-insensitive:
1. log on with root and modify/etc/my. cnf;
2. add a row under the [mysqld] Node: lower_
Upgrade centos to the latest mysql CentOS
Download the mysql yum source from the website at the following address:Http://repo.mysql.com/Check the system version number on linux and download it based on the version
MariaDBProxy implementation of read/write splitting MariaDB
Implementation of MariaDB Proxy read/write splitting
1. create an lvm device for storing data directories
Install mysql-proxy-0.8.3
MariaDB details: Click hereMariaDB's: Click here
--
Cloud Mysql compared an article on Sitepoint, comparing aws rds, Google Cloud SQL, ClearDB, and Xeround four Cloud-based Mysql products, including their functions, prices, limits, and other factors. Reference:
Even though all providers offer a
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