Refer to the following links:
http://blog.csdn.net/wendi_0506/article/details/39478369
650) this.width=650; title= centos6.6 under Edit installation mysql-5.6.21" Name= "image_operate_56571415713734219" alt= "centos6.6 under Edit installation mysql-5.6.21" src= "http://s14.sinaimg.cn/mw690/003SgaQkgy6Nxa5Piqhdd&690" width= "690" height= "+"/>
650) this.width=650; title= centos6.6 under Edit installation mysql-5.6.21 "Name=" Image_operate_ 36771415717435156 "alt=" centos6.6 under Edit installation mysql-5.6.21 "src=" http://s9.sinaimg.cn/mw690/003sgaqkgy6nxa5yyyg78& 690 "Width=" 690 "height=" 384 "/>
2.yuminstallgccgcc-c++ncurses-develperl cmake-y
3. Useradd-m-s/sbin/nologinmysql
4.mkdir-p/usr/ local /mysql
5. CMake \
Dcmake_install_prefix=/usr/local/mysql \
-dmysql_unix_addr=/usr/local/mysql/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_innobase_storage_engine=1 \
-dwith_archive_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-DMYSQL_DATADIR=USR/LOCAL/MYSQ/DATA/MYSQLDB \
-dmysql_tcp_port=3306 \
-denable_downloads=1
( rerun configuration, You need to delete the CMakeCache.txt file. : Make clean; rmcmakecache.txt )
The parameters section can be consulted: http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html
6.make;make Install;
7.Chown-rvmysql:mysql/usr/local/mysql
8./usr/local/mysql/scripts/mysql_install_db--user=mysql--datadir=/usr/local/mysql/data/mysqldb
When a MySQL system library (MySQL system library) fails or a new MySQL instance is required, the MySQL database needs to be initialized, the authorization table is generated, the existing MySQL authorization table is not overwritten, and it does not affect any other data.
Introduction to the Authorization form http://www.searchdatabase.com.cn/showcontent_31062.htm
Http://www.linuxidc.com/Linux/2013-07/88024.htm
9.cp/usr/Local/mysql/support-files/my-default. CNF/ETC/MY.CNF (Copy the configuration file and make modifications)
Cpsupport-files/mysql.server/etc/init.d/mysqld (copy startup script)
650) this.width=650; "Title=" centos6.6 under Edit install mysql-5.6.21 "name=" image_operate_16921415890185190 "alt=" centos6.6 under Edit install mysql-5.6.21 "src=" http://s10.sinaimg.cn/mw690/003SgaQkgy6NAq5iiP7a9&690 "width=" 566 "height=" 315 "/>
10. Modify the environment variables so that MySQL can recognize them automatically.
Vim/etc/profile
Path=/usr/local/mysql/bin:/usr/local/mysql/lib: $PATH
Export PATH
Source/etc/profile
650) this.width=650; "Title=" centos6.6 under Edit install mysql-5.6.21 "name=" image_operate_27251415890474113 "alt=" centos6.6 under Edit install mysql-5.6.21 "src=" http://s4.sinaimg.cn/mw690/003SgaQkgy6NAqvYvrZ93&690 "width=" 418 "height=" 254 "/>
11.service mysqld Start
Mysql-uroot-p
The initial password is generally empty, can be logged on the description has been successful.
mysqladmin-urootpassword ' 123456 ' (can use Mysqladmin to modify the user's password)
production database recommended to run,/usr/ Span style= "Border-bottom:medium none;border-left:medium none;padding-bottom:0px;margin:0px;padding-left:0px; Padding-right:0px;color:rgb (0,102,153); Border-top:medium none;font-weight:bold;border-right:medium none; padding-top:0px; " >local /mysql/bin/mysql_secure_installation
To perform several settings:
A) set a password for the root user
b) Delete Anonymous account
c) Remove the root user from remote login
d) Delete the test library and access to the test library
e) Refresh the authorization form for the changes to take effect
Http://www.jb51.net/article/47727.htm
13. Start the MySQL service and join the boot-up (optional This step, you can start it later)
Service mysqld Start
Chkconfig--level mysqld on
centos6.6 under Edit installation mysql-5.6.21