Multiple mysql 5.7.14 installation tutorials under ubuntu kylin 14.10, kylin5.7.14

Source: Internet
Author: User

Multiple mysql 5.7.14 installation tutorials under ubuntu kylin 14.10, kylin5.7.14

As mentioned above, multiple mysql instances must be installed because you need to test the master-slave configuration scheme of mysql. This is the installation of multiple mysql 5.7.14 on ubuntu kylin 14.10.

System Environment: ubuntu kylin 14.10, 64-bit System
Mysql version: 5.7.14 community Edition
Mysql: http://dev.mysql.com/downloads/mysql/, select Linux-genericand download mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz of 612.9m.
Official mysql installation documentation: Workshop

Shell> sudo groupadd mysqlshell> sudo useradd-r-g mysql-s/bin/false mysqlshell> cd/usr/localshell> sudo tar-zxvf/path/to/mysql-VERSION-OS.tar.gzshell> sudo mv mysql-5.7.14-linux-glibc2.5-x86_64 mysql-5.7.14-linux-glibc2.5-x86_64-3306 # change the mysql directory name shell> sudo ln-s mysql-5.7.14-linux-glibc2.5-x86_64-3306 mysql-3306shell> cd mysql-3306shell> sudo mkdir mysql-filesshell> sudo chmod 750 mysql-filesshell> sudo chown-R mysql: mysql. shell> sudo cp support-files/my-default.cnf. /my. cnf # copy a copy my. cnf and edit my. cnf: open items such as basedir, datadir, and port, and configure as follows: basedir =/usr/local/mysql-3306datadir =/usr/local/mysql-3306/dataport = 3306server_id = 11 then start initializing mysql on port 3306: shell> sudo bin/mysqld -- defaults-file =/usr/local/mysql-3306/my. cnf -- initialize -- user = mysql2016-07-29T15: 38: 48.896585Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. please use -- explicit_defaults_for_timestamp server option (see documentation for more details ). 2016-07-29T15: 38: 48.896672Z 0 [Warning] 'No _ ZERO_DATE ', 'no _ ZERO_IN_DATE' and 'error _ FOR_DIVISION_BY_ZERO 'SQL modes shocould be used with strict mode. they will be merged with strict mode in a future release.2016-07-29T15: 38: 48.896682Z 0 [Warning] 'No _ AUTO_CREATE_USER 'SQL mode was not set.2016-07-29T15: 38: 50.498675Z 0 [Warning] InnoDB: New log files created, LSN = Priority: 38: 50.890849Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.2016-07-29T15: 38: 51.062752Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. generating a new UUID: 8c708a13-55a2-11e6-835e-a0481ced538c.2016-07-29T15: 38: 51.088854Z 0 [Warning] Gtid table is not ready to be used. table 'mysql. gtid_executed 'cannot be opened.2016-07-29T15: 38: 51.090179Z 1 [Note] A temporary password is generated for root @ localhost: pJLwjf % q; 1 t) shell> sudo bin/mysql_ssl_rsa_setup -- defaults-file =/usr/local/mysql-3306/my. cnfGenerating a 2048 bit RSA private key ......... ++ ....................... ++ writing new private key to 'Ca-key. pem' ----- Generating a 2048 bit RSA private key .......... ++ ..................................... ......................... ++ writing new private key to 'server-key. pem' ----- Generating a 2048 bit RSA private key .............................. .................. ++ ........................................ ++ writing new private key to 'client-key. pem' ----- shell> sudo chown-R root. shell> sudo chown-R mysql data mysql-filesshell> sudo bin/mysqld_safe -- user = mysql & # Start mysql, run # Next command is optionalshell> cp support-files/mysql in the background. server/etc/init. d/mysql. server

2. log on to mysql to perform related operations.

/Usr/local/mysql-3306> bin/mysql-uroot-p
Note that during bin/mysqld initialization, a temporary password is provided in the prompt at the end of the command line. You can log on after entering the temporary password. After logging on to mysql, you must change the password immediately. Otherwise, you cannot perform any operations. Run the following command to modify the password of 'root' @ 'localhost:

mysql> SET PASSWORD = PASSWORD('your new password');mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;mysql> flush privileges;

To allow remote logon, add a 'root' @ '%' account:

Copy codeThe Code is as follows: mysql> grant all privileges on *. * to 'root' @ '%' identified by 'your new password' with grant option;

3.install mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz and Configure Ports 3307, 3308, and 3309 to Install Multiple mysql instances.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.