安装环境:系统是 centos6.5
1、下载
下载地址:http://dev.mysql.com/downloads/mysql/5.6.html#downloads
下载版本:我这里选择的5.6.33,通用版,linux下64位
也可以直接复制64位的下载地址,通过命令下载:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
2、解压
1 2 3 4 | tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64. tar .gz
cp -r mysql-5.6.33-linux-glibc2.5-x86_64 /usr/local/mysql
|
3、添加用户组和用户
1 2 3 4 | groupadd mysql
useradd -g mysql mysql
|
4、安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | cd /usr/local/mysql/ <br> mkdir . /data/mysql
chown -R mysql:mysql ./
. /scripts/mysql_install_db --user=mysql --datadir= /usr/local/mysql/data/mysql
cp support-files /mysql .server /etc/init .d /mysqld
chmod 755 /etc/init .d /mysqld
cp support-files /my-default .cnf /etc/my .cnf
vi /etc/init .d /mysqld
basedir= /usr/local/mysql/
datadir= /usr/local/mysql/data/mysql
service mysqld start
. /mysql/bin/mysql -uroot
export PATH=$PATH: /usr/local/mysql//bin <br> source /etc/profile
service mysqld start
service mysqld stop
service mysqld status
|