Single server multiple MySQL server

Source: Internet
Author: User

#mkdir/home/mysql_servers/mysql330{7,8,9}-P

#useradd-G MySQL mysql3307-s/bin/nologin-d/home/mysql_servers/mysql3307

#tar XF mysql.tar.gz

#cd mysql/

#./configure--prefix=/home/mysql_servers/mysql3307

#make

#make Install

#cp mysql3307/share/mysql/my-medium.cnf mysql3307/my.cnf

#vi MYSQL3307/MY.CNF--in the following part of the revised place

[Client]

#password= Your_password

Port= 3307

Socket=/tmp/mysql3307.sock

[Mysqld]

Port= 3307

Socket=/tmp/mysql3307.sock

DataDir =/home/mysql_servers/mysql3307/data

Log-error =/var/log/mysqld3307.log--The error log file is typed for troubleshooting

Pid-file =/home/mysql_servers/mysql3307/3307.pid

Log-bin=/home/mysql_servers/mysql3307/data/mysql-bin


Initialization of the database:

#/home/mysql_servers/mysql3307/bin/mysql_install_db--basedir=/home/mysql_servers/mysql3307/--datadir=/home/ Mysql_servers/mysql3307/data--user=mysql3307


Start MySQL:--Be sure to note that the configuration my.cnf the error log,

#/home/mysql_servers/mysql3307/bin/mysqld_safe--DEFAULTS-FILE=/HOME/MYSQL_SERVERS/MYSQL3307/MY.CNF--user= MYSQL3307 &

To turn off the MySQL service:

#/home/mysql_servers/mysql3307/bin/mysqladmin-uroot-p-s/tmp/mysql3307.sock shutdown




This article is from the "Stone" blog, please be sure to keep this source http://dodowolf.blog.51cto.com/793581/1572698

Single server multiple MySQL server

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.