Cent OS 6.5 Mysql-5.6.19 compilation installation

Source: Internet
Author: User

Today to write a compilation of MySQL 5.6.19 installation, now 5.6 version of the installation compared to a little bit, do not pull the start!

Installation Environment

Os:cent OS 6.5

Software: Mysql 5.6.19

Download software

Http://mirrors.sohu.com/mysql/MySQL-5.6/Mysql-5.6.19.tar.gz

Pre-installation Environment configuration

    #yum  install -y lrzsz  (This software can upload files)     #rz                     (Find the MySQL you just downloaded)     #yum  groupinstall development tools  server platform development desktop platform developkment               (Install the build environment)     #yum  install - y cmake    #yum  install -y ncurses-devel    #useradd  -r  mysql    #mkdir  -p /usr/local/mysql    #mkdir  -p /mysql/ data    #tar  xf mysql-5.6.19.tar.gz    #cd  mysql-5.6.19     #cmake  -dcmake_install_prefix=/usr/local/mysql -dmysql_datadir=/mysql/data 

Check size of pthread_t
--Check size of Pthread_t-done
--Using CMake version 2.6.4
--Not building NDB
--Performing Test have_peercred
--Performing Test have_peercred-success
--Library mysqlclient depends on OSLIBS-LPTHREAD;M;RT;DL
--Googlemock was not found. Gtest-based unit tests would be disabled. You can run CMake. -denable_downloads=1 to automatically download and build required the from source.
--If You is inside a firewall, you may need the use of an HTTP Proxy:export http_proxy=http://example.com:80
--Library MySQLServer depends on OSLIBS-LPTHREAD;M;RT;CRYPT;DL
--Configuring done
--Generating done
--Build files has been written to:/mydata/software/mysql-5.6.19

(see above for pre-compilation configuration success)

#make && make Install

--Installing:/usr/local/mysql/man/man1/mysql_fix_extensions.1
--Installing:/usr/local/mysql/man/man1/mysqlaccess.1
--Installing:/usr/local/mysql/man/man1/my_print_defaults.1
--Installing:/usr/local/mysql/man/man1/mysqltest.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYISAM_FTDUMP.1
--Installing:/usr/local/mysql/man/man1/comp_err.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYSQL_UPGRADE.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYSQL_SETPERMISSION.1
--Installing:/usr/local/mysql/man/man1/mysql_config_editor.1
--Installing:/usr/local/mysql/man/man1/mysqlshow.1
--Installing:/usr/local/mysql/man/man1/mysql_find_rows.1
--Installing:/usr/local/mysql/man/man1/mysql_convert_table_format.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/RESOLVEIP.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYSQLADMIN.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/RESOLVE_STACK_DUMP.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/REPLACE.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYSQLDUMP.1
--Installing:/usr/local/mysql/man/man1/perror.1
--Installing:/usr/local/mysql/man/man1/mysql.server.1
--Installing:/usr/local/mysql/man/man1/mysql_install_db.1
--Installing:/usr/local/mysql/man/man1/myisamlog.1
--Installing:/usr/local/mysql/man/man1/mysql_config.1
--Installing:/USR/LOCAL/MYSQL/MAN/MAN1/MYSQLSLAP.1
--Installing:/usr/local/mysql/man/man1/mysqlhotcopy.1
--Installing:/usr/local/mysql/man/man8/mysqld.8

(See the information above to indicate that the compilation installation was successful)

Configuring the MySQL configuration file

#cd/usr/local/mysql #ll

Total 156
Drwxr-xr-x 2 root root 4096 may 14:36 bin
-rw-r--r--1 root root 17987 May 6 18:45 COPYING
Drwxr-xr-x 3 root root 4096 may 14:29 data
Drwxr-xr-x 2 root root 4096 may 14:29 docs
Drwxr-xr-x 3 root root 4096 may 14:29 include
-rw-r--r--1 root root 89163 May 6 18:46 install-binary
Drwxr-xr-x 3 root root 4096 May 14:29 Lib
Drwxr-xr-x 4 root root 4096 14:36 man
Drwxr-xr-x root root 4096 may 14:36 mysql-test
-rw-r--r--1 root root 2496 May 6 18:45 README
Drwxr-xr-x 2 root root 4096 may 14:36 scripts
Drwxr-xr-x root root 4096 may 14:36 share
Drwxr-xr-x 4 root root 4096 may 14:36 Sql-bench
Drwxr-xr-x 2 root root 4096 may 14:36 Support-files

#vim/etc/profile (Add the following to the last line) export path=/usr/local/mysql/bin:/usr/local/mysql/lib: $PATH #. /etc/profile (reread config file)

#chown-R root:mysql/usr/local/mysql/* #chown-R Mysql:msyql/mysql/data (owner and owner of the modified file)

#cd/usr/local/mysql/support-files #mv/etc/my.cnf/etc/my.cnf.bak #cp my-default.cnf/etc/my.cnf #cp mysql.se Rver/etc/rc.d/init.d/msyqld #chkconfig--add mysqld #chkconfig msyql on #./usr/local/mysql/scripts/msyql_inst all_db--user=mysql--datadir=/mysql/data--basedir=/usql/local/mysql

To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system

REMEMBER to SET A PASSWORD for the MySQL root USER!
To does 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 localhost.localdomain password ' new-password '

Alternatively you can run:

/usr/local/mysql/bin/mysql_secure_installation

Which would 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

Problems at http://bugs.mysql.com/

The latest information about MySQL was available on the Web at

Http://www.mysql.com

Support for MySQL by buying support/licenses at http://shop.mysql.com

New Default Config file was created as/usr/local/mysql/my.cnf and
Would be used by default by the server when you start it.
You could edit this file to the Change server settings

Warning:default config FILE/ETC/MY.CNF exists on the system
This file is being read by default by the MySQL server
Either remove it, or use the want
--defaults-file argument to Mysqld_safe when starting the server

(see above for initialization of MSYQL success)

#service msyqld Start

Starting MySQL ....... .................. [OK]


This compilation is complete!



This article is from the "Linux" blog, so be sure to keep this source http://wuguohua2014.blog.51cto.com/660821/1532580

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.