????1. ????????CentOS 6.3 x86_64???????????RHEL 6.3
????2. ?????????

???????MySQL????????????????????????????б??????????????????????MySQL??????????????????????????????????????????????а????????????????????????????????????????????????e?????????????????????????.tar.gz????????????????????RPM???????????а??????????????????????????????????????????
????3. ??????????
????a. ???????????
????http://dev.mysql.com/downloads/mysql/#downloads
????????????????
????http://dev.mysql.com/downloads/mirrors.html
????2. ??????????????????????????????汾????
????a. ??e??????
????mysql-5.5.29-linux2.6-x86_64.tar.gz
????b. RPM?????????
????MySQL-server-5.5.29-2.el6.x86_64.rpm
????MySQL-client-5.5.29-2.el6.x86_64.rpm
????4. ??e??????
????a. ????????????grep??-i??????????????Сд
????[root@localhost JavaEE]#rpm -qa|grep -i mysql
????mysql-libs-5.1.61-4.el6.x86_64
????*??????????????????????ж????????????????????ж:????????--nodeps??????????????????
????[root@localhost JavaEE]#rpm -e mysql-libs-5.1.61-4.el6.x86_64 --nodeps
????b. ???mysql???mysql?????????????mysql????????????????????顣
????[root@localhost JavaEE]#groupadd mysql
????[root@localhost JavaEE]#useradd -r -g mysql mysql
????*useradd -r???????mysql??????????????????????????
????c. ???????????????????????????????????????/usr/local
????[root@localhost ~]# cd/usr/local/
????[root@localhost local]#tar zxvf /path/to/mysql-5.5.29-linux2.6-x86_64.tar.gz
????*???????/usr/local/????????????????mysql-5.5.29-linux2.6-x86_64???????????????????????????????????mysql??????????
????[root@localhost local]#ln -s mysql-5.5.29-linux2.6-x86_64 mysql
????d. /usr/local/mysql/?μ?????
????Directory
????Contents of Directory
????bin
????Client programs and themysqldserver
????data
????Log files?? databases
????docs
????Manual in Info format
????man
????Unix manual pages
????include
????Include (header) files
????lib
????Libraries
????scripts
????mysql_install_db
????share
????Miscellaneous support files?? including error messages?? sample configuration files?? SQL for database installation
????sql-bench
????Benchmarks
????e. ????mysql????У????mysql????????????????????????????
????[root@localhost local]#cd mysql
????[root@localhost mysql]#chown -R mysql .
????[root@localhost mysql]#chgrp -R mysql .
????f. ???mysql_install_db???????mysql?е?data?????г???????????Щ????????mysql???????mysqld??????????data????????????????mysqld???????????????????????mysql??????????????????????root??У???????????--user=mysql??
????[root@localhost mysql]scripts/mysql_install_db --user=mysql
????*???mysql???????????????????/usr/local/mysql????????????????????????
????[root@localhost mysql]scripts/mysql_install_db --user=mysql
????--basedir=/opt/mysql/mysql
????--datadir=/opt/mysql/mysql/data
????*??mysql/???3???data/????????????????root??????У?mysql?????????mysql/data/????????????????????
????[root@localhost mysql]chown -R root .
????[root@localhost mysql]chown -R mysql data
????g. ???????????
????[root@localhost mysql] cp support-files/my-medium.cnf /etc/my.cnf
????h. ??mysqld???????????????
????*?????????scripts/mysql.server???????????/etc/init.d/???????????mysqld??
????[root@localhostmysql] cp support-files/mysql.server /etc/init.d/mysqld
????*???chkconfig????mysqld???????????????????С?
????[root@localhost mysql]#chkconfig --addmysqld
????*??????????mysqld???????mysql.server?????/etc/init.d/??????????????
????*??????????
????[root@localhost mysql]#chkconfig --list mysqld
????mysqld 0:off 1:off2:on3:on4:on5:on6:off
????i. ????????mysqld???????????
????*?????????
????[root@localhost mysql]#netstat -anp|grep mysqld
????tcp 00 0.0.0.0:33060.0.0.0:* LISTEN 2365/mysqld
????unix 2[ ACC ] STREAM LISTENING 143962365/mysqld/tmp/mysql.sock
????*????????????????????????????????
????[root@localhost mysql]#service mysqld start
????Starting MySQL.. SUCCESS!
????j. ???п???????mysql????mysql/bin???У?????????????mysqld??
????[root@localhost mysql]#/usr/local/mysql/bin/mysql
????Welcome to the MySQLmonitor. Commands end with ; or g.
????Your MySQL connection idis 2
????Server version:5.5.29-log MySQL Community Server (GPL)
????Copyright (c) 2000?? 2012??Oracleand/or its affiliates. All rights reserved.
????Oracle is a registeredtrademark of Oracle Corporation and/or its affiliates. Other names may betrademarks of their respective owners.
????Type 'help;' or 'h' forhelp. Type 'c' to clear the current input statement.
????mysql> quit
????Bye
????*????????mysql>???????????????????sql???????quit??exit?????????????ζ?????mysql???·??/usr/local/mysql/bin/mysql?????????????????У???/etc/profile?????????????
????MYSQL_HOME=/usr/local/mysql
????export PATH=$PATH:$MYSQL_HOME/bin
??????????????shell?????????mysql???????????????????
????[root@localhost mysql]#mysql
????Welcome to the MySQLmonitor. Commands end with ; or g.
????Your MySQL connection idis 3
????Server version:5.5.29-log MySQL Community Server (GPL)
????Copyright (c) 2000?? 2012??Oracle and/or its affiliates. All rights reserved.
????Oracle is a registeredtrademark of Oracle Corporation and/or its
????affiliates. Other namesmay be trademarks of their respective
????owners.
????Type 'help;' or 'h' forhelp. Type 'c' to clear the current input statement.
????mysql>