sher 发表于 2018-9-27 08:52:46

mysql-5.6+mysql-proxy构建主从复制与读写分离

# tar fzvx mysql-5.6.16-linux-x86_64.tar.gz -C /usr/local/  
# mv mysql-5.6.16-linux-x86_64 mysql
  
# cd mysql/
  
# chown -R root:mysql .
  
# chown -R mysql:mysql data/
  
# ./scripts/mysql_install_db --user=mysql \
  
> --basedir=/usr/local/mysql/ \
  
> --datadir=/usr/local/mysql/data/
  
WARNING: The host 'master' could not be looked up with /usr/local/mysql//bin/resolveip.
  
This probably means that your libc libraries are not 100 % compatible
  
with this binary MySQL version. The MySQL daemon, mysqld, should work
  
normally with the exception that host name resolving will not work.
  
This means that you should use IP addresses instead of hostnames
  
when specifying MySQL privileges !
  
Installing MySQL system tables...2014-04-26 19:57:06 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  
2014-04-26 19:57:06 1258 InnoDB: Using atomics to ref count buffer pool pages
  
2014-04-26 19:57:06 1258 InnoDB: The InnoDB memory heap is disabled
  
2014-04-26 19:57:06 1258 InnoDB: Mutexes and rw_locks use GCC atomic builtins
  
2014-04-26 19:57:06 1258 InnoDB: Compressed tables use zlib 1.2.3
  
2014-04-26 19:57:06 1258 InnoDB: Using Linux native AIO
  
2014-04-26 19:57:06 1258 InnoDB: Using CPU crc32 instructions

  
2014-04-26 19:57:06 1258 InnoDB: Initializing buffer pool,>  
2014-04-26 19:57:07 1258 InnoDB: Completed initialization of buffer pool
  
2014-04-26 19:57:07 1258 InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

  
2014-04-26 19:57:07 1258 InnoDB: Setting file ./ibdata1>  
2014-04-26 19:57:07 1258 InnoDB: Database physically writes the file full: wait...

  
2014-04-26 19:57:07 1258 InnoDB: Setting log file ./ib_logfile101>
  
2014-04-26 19:57:11 1258 InnoDB: Setting log file ./ib_logfile1>  
2014-04-26 19:57:15 1258 InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
  
2014-04-26 19:57:15 1258 InnoDB: New log files created, LSN=45781
  
2014-04-26 19:57:15 1258 InnoDB: Doublewrite buffer not found: creating new
  
2014-04-26 19:57:15 1258 InnoDB: Doublewrite buffer created
  
2014-04-26 19:57:15 1258 InnoDB: 128 rollback segment(s) are active.
  
2014-04-26 19:57:15 1258 InnoDB: Creating foreign key constraint system tables.
  
2014-04-26 19:57:16 1258 InnoDB: Foreign key constraint system tables created
  
2014-04-26 19:57:16 1258 InnoDB: Creating tablespace and datafile system tables.
  
2014-04-26 19:57:16 1258 InnoDB: Tablespace and datafile system tables created.
  
2014-04-26 19:57:16 1258 InnoDB: Waiting for purge to start
  
2014-04-26 19:57:16 1258 InnoDB: 5.6.16 started; log sequence number 0
  
2014-04-26 19:57:16 1258 RSA private key file not found: /usr/local/mysql/data//private_key.pem. Some authentication plugins will not work.
  
2014-04-26 19:57:16 1258 RSA public key file not found: /usr/local/mysql/data//public_key.pem. Some authentication plugins will not work.
  
2014-04-26 19:57:17 1258 Binlog end
  
2014-04-26 19:57:17 1258 InnoDB: FTS optimize thread exiting.
  
2014-04-26 19:57:17 1258 InnoDB: Starting shutdown...
  
2014-04-26 19:57:19 1258 InnoDB: Shutdown completed; log sequence number 1625977
  
OK
  
Filling help tables...2014-04-26 19:57:19 0 TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  
2014-04-26 19:57:19 1281 InnoDB: Using atomics to ref count buffer pool pages
  
2014-04-26 19:57:19 1281 InnoDB: The InnoDB memory heap is disabled
  
2014-04-26 19:57:19 1281 InnoDB: Mutexes and rw_locks use GCC atomic builtins
  
2014-04-26 19:57:19 1281 InnoDB: Compressed tables use zlib 1.2.3
  
2014-04-26 19:57:19 1281 InnoDB: Using Linux native AIO
  
2014-04-26 19:57:19 1281 InnoDB: Using CPU crc32 instructions

  
2014-04-26 19:57:19 1281 InnoDB: Initializing buffer pool,>  
2014-04-26 19:57:19 1281 InnoDB: Completed initialization of buffer pool
  
2014-04-26 19:57:19 1281 InnoDB: Highest supported file format is Barracuda.
  
2014-04-26 19:57:19 1281 InnoDB: 128 rollback segment(s) are active.
  
2014-04-26 19:57:19 1281 InnoDB: Waiting for purge to start
  
2014-04-26 19:57:19 1281 InnoDB: 5.6.16 started; log sequence number 1625977
  
2014-04-26 19:57:19 1281 RSA private key file not found: /usr/local/mysql/data//private_key.pem. Some authentication plugins will not work.
  
2014-04-26 19:57:19 1281 RSA public key file not found: /usr/local/mysql/data//public_key.pem. Some authentication plugins will not work.
  
2014-04-26 19:57:19 1281 Binlog end
  
2014-04-26 19:57:19 1281 InnoDB: FTS optimize thread exiting.
  
2014-04-26 19:57:19 1281 InnoDB: Starting shutdown...
  
2014-04-26 19:57:21 1281 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 master 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 at http://bugs.mysql.com/
  
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
  
New default config file was created as /usr/local/mysql//my.cnf and
  
will be used by default by the server when you start it.
  
You may edit this file to change server settings
  
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.


页: [1]
查看完整版本: mysql-5.6+mysql-proxy构建主从复制与读写分离