MySQL 使用mysqld_multi部署单机多实例详细过程(四)

2015-07-16 12:08:25 · 作者: · 浏览: 4
ption (see documentation for more details).
2015-05-14 09:31:22 12332 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)
?
2015-05-14 09:31:22 12332 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000)
?
2015-05-14 09:31:22 12332 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-14 09:31:22 12332 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-14 09:31:22 12332 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-05-14 09:31:22 12332 [Note] InnoDB: Using CPU crc32 instructions
2015-05-14 09:31:22 12332 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-14 09:31:22 12332 [Note] InnoDB: Completed initialization of buffer pool
2015-05-14 09:31:22 12332 [Note] InnoDB: Highest supported file format is Barracuda.
2015-05-14 09:31:22 12332 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-14 09:31:22 12332 [Note] InnoDB: Waiting for purge to start
2015-05-14 09:31:22 12332 [Note] InnoDB: 5.6.12 started; log sequence number 1625977
2015-05-14 09:31:22 12332 [Note] Binlog end
2015-05-14 09:31:22 12332 [Note] InnoDB: FTS optimize thread exiting.
2015-05-14 09:31:22 12332 [Note] InnoDB: Starting shutdown...
2015-05-14 09:31:24 12332 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
?
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
?
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
?
? /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
? /usr/local/mysql/bin/mysqladmin -u root -h data02 password 'new-password'
?
Alternatively you can run:
?
? /usr/local/mysql/bin/mysql_secure_installation
?
which will also give you the option of removing the test
databases and anonymous user created by default.? This is
strongly recommended for production servers.
?
See the manual for more instructions.
?
You can start the MySQL daemon with:
?
? cd . ; /usr/local/mysql/bin/mysqld_safe &
?
You can test the MySQL daemon with mysql-test-run.pl
?
? cd mysql-test ; perl mysql-test-run.pl
?
Please report any problems with the ./bin/mysqlbug script!
?
The latest information about MySQL is available on the web at
?
? http://www.mysql.com
?
Support MySQL by buying support/licenses at http://shop.mysql.com
?
WARNING: Could not copy config file template /usr/local/mysql/support-files/my-default.cnf to
/usr/local/mysql/my-new.cnf, may not have access rights to do so.
You may want to copy the file manually, or create your own,
it will then be used by default by the server when you start it.
?
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
--defaults-file argument to mysqld_safe when starting the server


5,启动多实例数据库


mkdir -p /home/mysql/data/log


[mysql@data02 data]$ mysqld_multi--defaults-extra-file=/etc/my.cnf start 1,2,3


[mysql@data02 data]$


后台日志信息:


Starting MySQL servers
150514 09:36:14 mysqld_safe Logging to'/home/data/mysql3309/data/data02.err'.
150514 09:36:15 mysqld_safe Logging to '/home/data/mysql3308/data/data02.err'.
150514 09:36:15 mysqld_safe Logging to'/home/data/mysql3307/data/data02.err'.
150514 09:36:15 mysqld_safe Starting mysqlddaemon with databases from /home/data/mysql3308/data
150514 09:36:15 mysqld_safe Starting mysqlddaemon with datab