The first task is to prepare two MySQL servers
I'm using the 5.7 version of MySQL.
Installed in 192.168.1.11 (master) and 192.168.1.12 (from) two hosts respectively
Edit the master-slave mysql configuration file
Student (s#,sname,sage,ssex) Student tableCourse (c#,cname,t#) timetableSC (s#,c#,score) score tableTeacher (t#,tname) Teacher tableProblem:1, the inquiry "001" course is higher than "002" of all students of the school number;Select A.s#from (select
In the process of reading the first chapter, some important concepts have been sorted out.Lock particle sizeTable lock (server implementation, ignoring storage engine).Row locks (storage engine implementation, server not implemented).The acid
Start MySQL times wrong:ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)1. Check the/ETC/RC.D/INIT.D/MYSQLD status first to see if MySQL has been started.Also see if it is a permission issue.2.
1. Install the MySQL installation package firstYum-y install MySQL Mysql-server2. Start the MySQL service and set the start upService mysqld Start chkconfig mysqld on3. Security Configuration Wizard MySQLMysql_secure_installation Y[Email protected][
One, the principle of MySQL master-slave synchronizationThe main machine turns on the Bin-log log, synchronizes the Bin-log log to the slave machine, from the machine to the Relay-log according to the Bin-log log, and updates the data from the
Learning Addresshttp://www.jtthink.com/course/play/352Main Table: Prop_mainDo not say more carefully, normal business will be involved and considered relatively comprehensive. Characters commonly used segment "Product ID" "Product name" "Product
In the process of writing code, will often meet, the Chinese characters entered into the MySQL database, but the view, but found that the language is garbled in the case, people quite a headache, today just solved a problem like this, so simply
Returns a single piece of data as a one-dimensional indexed array: mysql_fetch_rowCall format: $row = mysql_fetch_row ($query)Function: Returns a single piece of data in the result setParameter: mysql_query The resource identifier returnedReturn
1 ImportJava.sql.*;2 3 Public classMysqltest {4 Public Static voidMain (string[] args) {5 //driver name6String Driver = "Org.gjt.mm.mysql.Driver";7 //URL points to the database name you want to access world8 //String
1: Use the show statement to find out what database currently exists on the server:Mysql> SHOW DATABASES;2:2. Create a database Mysqldatamysql> CREATE DATABASE Mysqldata;3: Select the database you createdmysql> use Mysqldata; (press ENTER to appear
Idea: To create a 2 log on the main service, each generation of statements or disk changes are written into the log, we can set up an account through the master server,Modify the next my.cnf configuration file to let the server establish Relaylog,
Source: Http://zhidao.baidu.com/link?url=p78PlTJZlheB4uSKCkmZApg-3qrTIBCS3yI5LbGJLEAnUuO3-4GE6dLqq1LWC_kneZMWxR6q_ Xw8ts4g7sf6e2wrowl3b2amk5kblpygsmsBoth Linux and Windows are commonThe first method:At the command line (not connected to the database)
Experiment:A master more from3307 Configuration:[Mysqld]Log-slave-updates # the middle need to open this .Log-bin =/data/3307/mysql-binexpire_logs_days = 7 #binlog How many days are saved find–mtime +7Prevents writes from the library from being
MySQL backup xtrabackup (recommended for backup InnoDB): https://www.percona.com/downloads/XtraBackup/Installing Xtrabackup[email protected] ~]# Yum install Percona-xtrabackupFull backup Node OneModify the configuration file, set to a single table
Mysql Partitioning technologyPartition
In terms of database access applications, there is only one table or one index logically, but in fact this table may consist of dozens of physical partition objects, each of which is an independent object, it
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