MySQL Multi-instance installation

Source: Internet
Author: User

If you are under budget, you can install multiple MySQL on a single server, but this is not recommended in the production library

[Email protected] scripts]#./mysql_install_db--basedir=/usr/local/mysql--datadir=/data/mysql_3306-- DEFAULTS-FILE=/ETC/MY.CNF--user=mysql [[email protected]]#./mysql_install_db--basedir=/usr/local/mysql--datadir= /DATA/MYSQL_3308--DEFAULTS-FILE=/ETC/MY.CNF--user=mysql [[email protected]]#./mysqld_multi--defaults-file=/etc/ MY.CNF start 3306,3308[[email protected] bin]#./mysqld_multi reportreporting mysqlserversmysql server Fromgroup: mysqld3306 is Runningmysql server fromgroup:mysqld3308 is running

[

[email protected] bin]# mysql-uroot -p -p3306 -h 192.168.1.48enter  Password:welcome to the mysqlmonitor.  commands end with ; or  \g.Your MySQLconnection id is 6Server version:5.6.16-log MySQL  community server  (GPL)  Copyright  (c)  2000,2014, oracle and/or its  affiliates. all rights reserved. oracle is aregistered trademark  of Oracle Corporation and/or itsaffiliates. Othernames may be  trademarks of their respectiveowners. type  ' help; '  or  ' \h ' for help. type  ' \c '  to clear the current input  statement. mysql> showdatabases;+--------------------+| database            |+--------------------+| information_schema| |  3306db             | |  mysql              | |  performance_schema| |  test               |+-------- ------------+5 rows in set  (0.00SEC)

[[Email protected] bin] #mysql  -uroot -p -s /data/mysql_3306/mysql_3306.sockenter  password:Welcome to the MySQLmonitor.  Commands end with ;  or \g.your mysqlconnection id is 7server version:5.6.16-log mysql  community server  (GPL)  Copyright  (c)  2000,2014, oracle and/or its  affiliates. all rights reserved. oracle is aregistered trademark  of Oracle Corporation and/or itsaffiliates. Othernames may be  trademarks of their respectiveowners. type  ' help; '  or  ' \h ' for help. type  ' \c '  to clear the current input  statement. mysql> showdatabases;+--------------------+| database            |+--------------------+| information_schema| |  3306db             | |  mysql              | |  performance_schema| |  test               |+-------- ------------+5 rows in set  (0.00SEC)

[[Email protected] bin] #mysql  -uroot -p -P3308 -h 192.168.1.48Enter  Password:welcome to the mysqlmonitor.  commands end with ; or  \g.Your MySQLconnection id is 7Server version:5.6.16-log MySQL  community server  (GPL)  Copyright  (c)  2000,2014, oracle and/or its  affiliates. all rights reserved. oracle is aregistered trademark  of Oracle Corporation and/or itsaffiliates. Othernames may be  trademarks of their respectiveowners. type  ' help; '  or  ' \h ' for help. type  ' \c '  to clear the current input  statement. mysql> showdatabases;+--------------------+| database            |+--------------------+| information_schema| |  3308db             | |  mysql              | |  performance_schema| |  test               |+-------- ------------+5 rows in set  (0.00sec)  mysql> quitbye

[[Email protected] bin] #mysql  -uroot -p -s /data/mysql_3308/mysql_3308.sockenter  password:Welcome to the MySQLmonitor.  Commands end with ;  or \g.your mysqlconnection id is 9server version:5.6.16-log mysql  community server  (GPL)  Copyright  (c)  2000,2014, oracle and/or its  affiliates. all rights reserved. oracle is aregistered trademark  of Oracle Corporation and/or itsaffiliates. Othernames may be  trademarks of their respectiveowners. type  ' help; '  or  ' \h ' for help. type  ' \c '  to clear the current input  statement. mysql> showdatabases;+--------------------+| database            |+--------------------+| information_schema| |  3308db             | |  mysql              | |  performance_schema| |  test               |+-------- ------------+5 rows in set  (0.00SEC)


This article is from the "Age volt" blog, please make sure to keep this source http://suifu.blog.51cto.com/9167728/1753992

MySQL Multi-instance installation

Related Article

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.