**************************************** ******************
The first part is to build a multi-mysql service on a server.
**************************************** ******************
I. xuyan
There is a mysqld_multi command in Mysql that can be used
Run multiple MySQL services on the same machine
Run multiple MySQL services on the same machine
**************************************** ******************
The first part is to build a multi-mysql service on a server.
*****************************
mysql,mysqldump,mysqladmin,php connecting to MySQL service often prompts the following error:
1
error 2002 (hy000: can ' t connect to local MySQL server through Socket ' /var/lib/mysql/mysqlsock ' (2
As shown below, PHP connection MySQL error:
SQLSTATE[HY000] [2002] Can ' t connect to local MySQL server through socket ' MySQL ' (2)
The test code is as follows:getmessage ();}" Solutions "Change host=localhost to host=127.0.0.1 !
First, Introduction MySQL master-slave replication, the previous time the production environment deployed a master-slave replication of the architecture, at that time now found a lot of information, now recordedSecond, topology diagramThird,
Role of the master and slave:
1. It can be used as a backup method.
2. read/write splitting to relieve the pressure on a database
MySQL master-slave backup principle:
Mysql master-slave replication requires at least two Mysql services. Of course,
Detailed steps for implementing mysql hot backup in linux (mysql master-slave replication) bitsCN.com
Role of the master and slave:
1. it can be used as a backup method.
2. read/write splitting to relieve the pressure on a database
MySQL
As shown below, PHP connection MySQL error:
SQLSTATE[HY000] [2002] Can ' t connect to the local MySQL server through socket ' MySQL ' (2)
The test code is as follows:
Try{$dsn = ' Mysql:dbname=php-note;host=localhost;port=3306;charset=utf8
Starting the MySQL service often prompts the following error:ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock 'This is due to the mysql.sock location of the socket file that modifies the MySQL
The role of Master and subordinate:
1. Can be used as a backup method
2. Used to achieve the separation of read and write, ease the pressure of a database
MySQL master-slave backup principle:
MySQL's master-slave replication is at least two
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.