标签:软连接 files glib The 初始化 cal wget 装包 grep
1. 下载二进制mysql的安装包[root@minion-1 ~]#wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz
[root@minion-1 ~]#mkdir -p /services/current_apps
[root@minion-1 ~]# tar -xzf mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz -C /services/current_apps
[root@minion-1 ~]# cd /services/current_apps/mysql-5.6.42-linux-glibc2.12-x86_6
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# cp support-files/mysql.server /etc/init.d/mysqld
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# cp support-files/my-default.cnf /etc/my.cnf
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# vi /etc/init.d/mysqld
#If you change base dir, you must also change datadir. These may get
overwritten by settings in the MySQL configuration files.
basedir=/usr/local/mysql
datadir=/data/mysql
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# mkdir /data
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# ln -s /services/current_apps/mysql-5.6.42-linux-glibc2.12-x86_64/ /usr/local/mysql
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# chkconfig --add mysqld
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# service mysqld start
Starting MySQL.Logging to ‘/data/mysql/minion-1.err‘.
... SUCCESS!
[root@minion-1 mysql-5.6.42-linux-glibc2.12-x86_64]# netstat -tupln|grep 3306|wc -l
1
标签:软连接 files glib The 初始化 cal wget 装包 grep
原文地址:https://blog.51cto.com/popli3/2357211