Binary installation MySQL 5.6

Source: Internet
Author: User
Tags crc32 deprecated

Create users and Groups

# groupadd MySQL # useradd-r-g MySQL MySQL

  

Unpack the Tarball

# TAR-XVF mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz# MV mysql-5.6.37-linux-glibc2.12-x86_64/usr/local# cd/usr/ local/# ln-s Mysql-5.6.37-linux-glibc2.12-x86_64/mysql
# CD mysql# lltotal 48drwxr-xr-x 2 root root 4096 1 13:13 bin-rw-r--r--1 7161 31415 17987 June 3 01:42 COPYINGDR Wxr-xr-x 3 root root 1 13:13 datadrwxr-xr-x 2 root root 1 13:13 docsdrwxr-xr-x 3 root root 40 1 13:13 includedrwxr-xr-x 3 root root 4096 1 13:13 libdrwxr-xr-x 4 root root 1 13:13 mandrwxr      -xr-x root root 4096 1 13:13 mysql-test-rw-r--r--1 7161 31415 2496 June 3 01:42 readmedrwxr-xr-x 2 root root 1 13:13 scriptsdrwxr-xr-x root root 4096 1 13:13 sharedrwxr-xr-x 4 root root 4096 1 13:13 s Ql-benchdrwxr-xr-x 2 root root 1 13:13 support-files# chown-r mysql. # chgrp-r MySQL. # lltotal 48drwxr-xr-  x 2 mysql mysql 4096 1 13:13 bin-rw-r--r--1 mysql mysql 17987 June 3 01:42 copyingdrwxr-xr-x 3 MySQL mysql 17 1 13:13 datadrwxr-xr-x 2 mysql mysql 1 13:13 docsdrwxr-xr-x 3 mysql mysql 4096 1 13:13 includedrw  Xr-xr-x 3 MySQL MySQL4096 1 13:13 libdrwxr-xr-x 4 mysql mysql 1 13:13 mandrwxr-xr-x mysql mysql 4096 1 13:13 mysql-te st-rw-r--r--1 MySQL MySQL 2496 June 3 01:42 readmedrwxr-xr-x 2 mysql mysql 1 13:13 scriptsdrwxr-xr-x   QL mysql 4096 1 13:13 sharedrwxr-xr-x 4 mysql mysql 4096 1 13:13 sql-benchdrwxr-xr-x 2 mysql MySQL 1 13:13 support-files

 

Initializing the database

# scripts/mysql_install_db--user=mysqlinstalling mysql system tables ... 2017-08-01 13:20:26 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-08-01 13:20:26 0 [not E] Ignoring--secure-file-priv value as server is running with--bootstrap.2017-08-01 13:20:26 0 [Note]./bin/mysqld (mysq LD 5.6.37) Starting as Process 3887 ... 2017-08-01 13:20:26 3887 [note] innodb:using Atomics to ref count buffer pool pages2017-08-01 13:20:26 3887 [note] InnoDB : The InnoDB memory heap is disabled2017-08-01 13:20:26 3887 [Note] innodb:mutexes and rw_locks use GCC atomic BUILTINS20 17-08-01 13:20:26 3887 [note] innodb:memory barrier is not used2017-08-01 13:20:26 3887 [note] innodb:compressed tables Use zlib 1.2.32017-08-01 13:20:26 3887 [note] innodb:using Linux native aio2017-08-01 13:20:26 3887 [note] Innodb:using CPU CRC32 instructions2017-08-01 13:20:26 3887 [Note] Innodb:initializing buffer pool, size = 128.0m2017-08-01 13:20:26 3887 [Note] innodb:completed initialization of buffer pool2017-08-01 13 : 20:26 3887 [Note] innodb:the first specified data file./ibdata1 did not exist:a new database to be created!2017-08-01 13:20:26 3887 [note] innodb:setting file./ibdata1 size to mb2017-08-01 13:20:26 3887 [note] Innodb:database physical Ly writes the file full:wait ... 2017-08-01 13:20:26 3887 [note] innodb:setting log file./ib_logfile101 size to ~ mb2017-08-01 13:20:26 3887 [note] Inno db:setting log file./ib_logfile1 size to mb2017-08-01 13:20:27 3887 [Note] innodb:renaming log file./ib_logfile101  To./ib_logfile02017-08-01 13:20:27 3887 [Warning] innodb:new log files created, lsn=457812017-08-01 13:20:27 3887 [Note] Innodb:doublewrite Buffer not found:creating new2017-08-01 13:20:27 3887 [Note] innodb:doublewrite buffer created2017- 08-01 13:20:27 3887 [Note] innodb:128 rollback segment (s) is active.2017-08-01 13:20:27 3887 [Warning] Innodb:creating FOREIGN KEY constraint system tables.2017-08-01 13:20:27 3887 [Note] innodb:foreign key constraint system tables created2017-08-01 13:20:27 3887 [Note] innodb:creating tablespace and datafile system tables.2017-08-01 13:20:27 3887 [No TE] innodb:tablespace and datafile system tables created.2017-08-01 13:20:27 3887 [Note] innodb:waiting for purge to STA rt2017-08-01 13:20:27 3887 [Note] innodb:5.6.37 started;  Log sequence number 02017-08-01 13:20:27 3887 [note] Binlog end2017-08-01 13:20:27 3887 [note] innodb:fts optimize thread exiting.2017-08-01 13:20:27 3887 [Note] innodb:starting shutdown ... 2017-08-01 13:20:29 3887 [Note] Innodb:shutdown completed; Log sequence number 1625977OKFilling help tables ... 2017-08-01 13:20:29 0 [Warning] TIMESTAMP with implicit the DEFAULT value is deprecated. --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-08-01 13:20:29 0 [not E] Ignoring--secure-file-priv value as server is running with--bootstrap.2017-08-01 13:20:29 0 [Note]./bin/mysqld (mysqld 5.6.37) starting as Process 3909 ... 2017-08-01 13:20:29 3909 [note] innodb:using Atomics to ref count buffer pool pages2017-08-01 13:20:29 3909 [note] InnoDB : The InnoDB memory heap is disabled2017-08-01 13:20:29 3909 [Note] innodb:mutexes and rw_locks use GCC atomic BUILTINS20 17-08-01 13:20:29 3909 [note] innodb:memory barrier is not used2017-08-01 13:20:29 3909 [note] innodb:compressed tables Use zlib 1.2.32017-08-01 13:20:29 3909 [note] innodb:using Linux native aio2017-08-01 13:20:29 3909 [note] Innodb:using CPU CRC32 instructions2017-08-01 13:20:29 3909 [Note] innodb:initializing buffer pool, size = 128.0m2017-08-01 13:20:29 3 909 [note] innodb:completed initialization of buffer pool2017-08-01 13:20:29 3909 [note] Innodb:highest supported file F Ormat is barracuda.2017-08-01 13:20:29 3909 [Note] innodb:128 rollback segment (s) was active.2017-08-01 13:20:29 3909 [No TE] innodb:waiting for purge to start2017-08-01 13:20:29 3909 [Note] innodb:5.6.37 started; Log sequence number 16259772017-08-01 13:20:29 3909 [note] Binlog end2017-08-01 13:20:29 3909 [note] Innodb:fts optimize Thread exiting.2017-08-01 13:20:29 3909 [Note] innodb:starting shutdown ... 2017-08-01 13:20:30 3909 [Note] Innodb:shutdown completed; Log sequence number 1625987OKTo start mysqld at boot time with Copysupport-files/mysql.server to the right place fo R your systemplease REMEMBER to SET A PASSWORD for the MySQL root USER! To does, start the server, then issue the following commands:./bin/mysqladmin-u root password ' new-password './bin/my Sqladmin-u root-h mysql7 password ' new-password ' Alternatively you can run:./bin/mysql_secure_installationwhich would AL  So give your the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers. See the Manual for more instructions. You can start the MySQL daemon with:cd. ;./bin/mysqld_safe &you can test THe MySQL daemon with mysql-test-run.pl CD mysql-test; Perl mysql-test-run.plplease Report No problems at Http://bugs.mysql.com/The latest information on MySQL is available On the web at Http://www.mysql.comSupport MySQL by buying support/licenses at Http://shop.mysql.comNew Default Config fil E was created as./my.cnf Andwill is used by default if you start it. Settingswarning:default config file/etc/my.cnf exists on the systemthis file wil L be read by default by the MySQL Serverif you does not want to use this, either remove it, or use The--defaults-file Argume NT to Mysqld_safe when starting the server

  

# chown-r Root. # chown-r MySQL data# lltotal 52drwxr-xr-x  2 root  mysql  4096  1 13:13 bin-rw-r--r--
   1 root  mysql 17987 June  3 01:42 copyingdrwxr-xr-x  3 mysql mysql  1 13:13 datadrwxr-xr-x  2 root  mysql  1 13:13 docsdrwxr-xr-x  3 root  mysql  4096  1 13:13 Includedrwxr-xr-x  3 root  mysql  4096  1 13:13 libdrwxr-xr-x  4 root  mysql  1 13:13 man-rw-r--r--  1 root  root    943  1 13:20 my.cnfdrwxr-xr-x root  mysql  4096  1 13:13 mysql-test-rw-r--r--  1 root  mysql  2496 June  3 01:42 readmedrwxr-xr-x  2 Root  mysql  1 13:13 scriptsdrwxr-xr-x root  mysql  4096  1 13:13 Sharedrwxr-xr-x  4 root  mysql  4096  1 13:13 sql-benchdrwxr-xr-x  2 root  mysql  1 13:13 support-files

  

Start the database

# Bin/mysqld_safe  --user=mysql &

  

Configure as Service

 

5.7 Refer to the following steps:

shell> Groupadd mysqlshell> useradd-r-g MySQL mysqlshell> cd/usr/localshell> tar zxvf/path/to/mysql-versio n-os.tar.gzshell> ln-s full-path-to-mysql-version-os mysqlshell> cd mysqlshell> mkdir mysql-filesshell>  chmod 770 mysql-filesshell> chown-r mysql .shell> chgrp-r mysql .shell> bin/mysql_install_db--user=mysql    # Before MySQL 5.7.6shell> bin/mysqld--initialize--user=mysql # mysql 5.7.6 and upshell> bin/mysql_ssl_rsa_setup
   # MySQL 5.7.6 and upshell> chown-r root .shell> chown-r mysql data mysql-filesshell> bin/mysqld_safe--user=m Ysql Next command is optionalshell> CP Support-files/mysql.server/etc/init.d/mysql.server

  

Binary installation MySQL 5.6

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.