Before compiling MySQL 5.6.x, the minimum number of packages to install are: BISON,GCC, gcc-c++, CMake, Ncurses-devel,
Install these dependent packages, the original extracted from the MySQL source directory deleted, and then extracted again, and then to compile.
--0
Download mysql-5.6.10.tar.gz in dev.mysql.com
--1 Install CMake Package
Tar xzvf cmake-2.8.3.tar.gz
./bootstrap
Gmake
Gmake Install
--2 Create account of MySQL
Groupadd MySQL
useradd-g MySQL MySQL
autoreconf--force--install
Libtoolize--automake--force
Automake--force--add-missing
--3 Complie the sources
Mkdir-p/data/mbdata
Tar Xvfz mysql-5.5.20.tar.gz
Yum--install CMake
Time CMake. -dcmake_install_prefix=/usr/local/mysql56-dmysql_datadir=/data56-dwith_innobase_storage_engine=1-dmysql_unix_ Addr==/data56/mysql.sock-dmysql_user=mysql-ddefault_charset=utf8-ddefault_collation=utf8_general_ci
--4 Build the DB directy
Time make
Time make Install
--5 Init DB
ll/usr/local/mysql56/
cd/usr/local/mysql56/
Chown-r MySQL.
Chgrp-r MySQL.
CP SUPPORT-FILES/MY-DEFAULT.CNF/ETC/MY56.CNF
scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql56--datadir=/data56--defaults-file=/etc/my56.cnf
[Root@mysql mysql56]# scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql56--datadir=/data56-- Defaults-file=/etc/my56.cnf
Warning:the host ' Mysql.yest.nos ' could is looked up with/usr/local/mysql56/bin/resolveip.
This probably means that your libc libraries are% compatible
With this binary MySQL version. The MySQL daemon, mysqld, should work
Normally with the exception of that host name resolving would not work.
This means the should use IP addresses instead of hostnames
When specifying MySQL privileges!
Installing MySQL system tables ... 2013-02-08 04:31:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
2013-02-08 04:31:20 63040 [note] innodb:the InnoDB memory heap is disabled
2013-02-08 04:31:20 63040 [note] innodb:mutexes and rw_locks use GCC atomic builtins
2013-02-08 04:31:20 63040 [note] innodb:compressed tables use zlib 1.2.3
2013-02-08 04:31:20 63040 [note] INNODB:CPU does not support CRC32 instructions
2013-02-08 04:31:20 63040 [note] innodb:using Linux native AIO
2013-02-08 04:31:20 63040 [note] innodb:initializing buffer pool, size = 128.0M
2013-02-08 04:31:20 63040 [note] innodb:completed initialization of buffer pool
2013-02-08 04:31:20 63040 [note] Innodb:the the specified of the new database to is/IBDATA1 not did the data file. exist:a ed!
2013-02-08 04:31:20 63040 [note] innodb:setting file./ibdata1 size to MB
2013-02-08 04:31:20 63040 [note] Innodb:database physically writes the file full:wait ...
2013-02-08 04:31:20 63040 [note] innodb:setting log file./ib_logfile101 size to MB
2013-02-08 04:31:20 63040 [note] innodb:setting log file./ib_logfile1 size to MB
2013-02-08 04:31:20 63040 [note] innodb:renaming log file./ib_logfile101 to./ib_logfile0
2013-02-08 04:31:20 63040 [Warning] innodb:new log files created, lsn=45781
2013-02-08 04:31:20 63040 [note] innodb:doublewrite buffer not found:creating new
2013-02-08 04:31:21 63040 [note] Innodb:doublewrite buffer created
2013-02-08 04:31:21 63040 [note] innodb:128 rollback segment (s) are active.
2013-02-08 04:31:21 63040 [Warning] innodb:creating FOREIGN KEY constraint system tables.
2013-02-08 04:31:21 63040 [note] innodb:foreign key constraint system tables created
2013-02-08 04:31:21 63040 [note] innodb:creating tablespace and datafile system tables.
2013-02-08 04:31:21 63040 [note] innodb:tablespace and datafile system tables created.
2013-02-08 04:31:21 63040 [note] innodb:waiting for purge to start
2013-02-08 04:31:21 63040 [note] innodb:1.2.10 started; Log sequence number 0
2013-02-08 04:31:26 63040 [note] Binlog end
2013-02-08 04:31:26 63040 [note] innodb:fts optimize thread exiting.
2013-02-08 04:31:26 63040 [note] innodb:starting shutdown ...
2013-02-08 04:31:28 63040 [note] Innodb:shutdown completed; Log sequence Number 1625977
Ok
Filling Help Tables ... 2013-02-08 04:31:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use--explicit_defaults_for_timestamp server option (the documentation for more details).
2013-02-08 04:31:28 63063 [note] innodb:the InnoDB memory heap is disabled
2013-02-08 04:31:28 63063 [note] innodb:mutexes and rw_locks use GCC atomic builtins
2013-02-08 04:31:28 63063 [note] innodb:compressed tables use zlib 1.2.3
2013-02-08 04:31:28 63063 [note] INNODB:CPU does not support CRC32 instructions
2013-02-08 04:31:28 63063 [note] innodb:using Linux native AIO
2013-02-08 04:31:28 63063 [note] innodb:initializing buffer pool, size = 128.0M
2013-02-08 04:31:28 63063 [note] innodb:completed initialization of buffer pool
2013-02-08 04:31:28 63063 [note] innodb:highest supported the file format is barracuda.
2013-02-08 04:31:28 63063 [note] innodb:128 rollback segment (s) are active.
2013-02-08 04:31:28 63063 [note] innodb:waiting for purge to start
2013-02-08 04:31:28 63063 [note] innodb:1.2.10 started; Log sequence Number 1625977
2013-02-08 04:31:28 63063 [note] Binlog end
2013-02-08 04:31:28 63063 [note] innodb:fts optimize thread exiting.
2013-02-08 04:31:28 63063 [note] innodb:starting shutdown ...
2013-02-08 04:31:30 63063 [note] Innodb:shutdown completed; Log sequence Number 1625987
Ok
To start mysqld at boot time and 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 did so, start the server, then issue the following commands:
/usr/local/mysql56/bin/mysqladmin-u root password ' new-password '
/usr/local/mysql56/bin/mysqladmin-u root-h mysql.yest.nos password ' new-password '
Alternatively you can run:
/usr/local/mysql56/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.
The manual for more instructions.
Can start the MySQL daemon with:
Cd. ; /usr/local/mysql56/bin/mysqld_safe &
Can test the MySQL daemon with mysql-test-run.pl
CD mysql-test; Perl mysql-test-run.pl
Please have a problems with the/bin/mysqlbug script!
The latest information about the 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/mysql56/my.cnf and
'll be used by default by the server when you start it.
You could edit this file to the Change server settings
--6 Copy Start command
CP support-files/mysql.server/etc/init.d/mysqld56
chmod 700/etc/init.d/mysqld56
echo "Export path= $PATH:/usr/local/mysql56/bin" >>/etc/profile
Source/etc/profile
--7 Add command to system parameter
Cd/data/mbdata
Chkconfig--add mysqld56
--8 Start service
Service mysqld56 Start