???????????????????????????????????????CentOS????????????????????????????????????????????RedHat Linux 5.10????????Mysql?????
?????????????
??????1??jdk-6u32-linux-x64.bin
??????2??MySQL-devel-5.6.16-1.linux_glibc2.5.x86_64.rpm
??????3??MySQL-server-5.6.16-1.linux_glibc2.5.x86_64.rpm
??????4??MySQL-client-5.6.16-1.linux_glibc2.5.x86_64.rpm
???????????????
????http://dev.mysql.com/downloads/mysql/
???????????????????
????http://pan.baidu.com/s/1bnemZXP
??????????????
????2.1 JDK????
????JDK?????????????????????????????????Java???????????RedHat??????????JDK??1.4.2?汾??????????java -version???????????JDK?汾??
???????????JDK?汾??????
??????1????vi /etc/profile.d/java.sh???
??????????′???
????export JAVA_HOME=/usr/java1.6
????export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
????export PATH=$JAVA_HOME/bin:$PATH
??????2????????????
????java -version
????2.2 MySQL???
????2.2.1 ???????????????MysQL????????
????rpm -qa |grep -i mysql
????2.2.2 ж?????????MysqL????????????汾??????????
????rpm -qa |grep -i mysql | rpm -e | sh
????2.2.3 ???MysQL
????1) rpm -ivh MySQL-devel-5.6.16-1.rhel5.x86_64
????2) rpm -ivh MySQL-server-5.6.16-1.rhel5.x86_64.rpm
????3) rpm -ivh MySQL-client-5.6.16-1.rhel5.x86_64.rpm
????2.3 ????Mysql?????
????2.3.1 ???mysql?????
????[root@AY1404 ~]# /etc/init.d/mysql start
????ERROR??
????ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
??????????????Mysql????????????????/etc/my.cnf???????????′???

 

--???????????·??
mkdir -p /usr/mysql/data
chown -R mysql:mysql /usr/mysql
chmod -R 777 /usr/mysql
--????my.cnf???
[mysqld]
datadir=/usr/mysql/data
socket=/var/lib/mysql/mysql.sock
port=3306
basedir=/usr
[mysql.server]
user=mysql
basedir=/usr
[client]
socket=/var/lib/mysql/mysql.sock