涓€閿儴缃?---mysql5.6--jue
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了涓€閿儴缃?---mysql5.6--jue相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/%e6%ba%90%e7%a0%81%e5%8c%85' title='婧愮爜鍖?>婧愮爜鍖?/a> ref extra source usr star curses 鎴愬姛
涓€閿儴缃?---mysql5.6--jue#!/bin/bash
cd /var/run
rm -rf yum.pid
read -p "璇疯緭鍏ysql婧愮爜鍖呯殑缁濆璺緞" c
cd $c
yum install -y ncurses-devel autoconf cmake
tar xzvf mysql-5.6.26.tar.gz
cd mysql-5.6.26/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DSYSCONFIDIR=/etc -DMYSQL_DATADIR=/home/mysqI/ -DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock
make && make install
cp support-files/my-default.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chkconfig --add /etc/init.d/mysqld
cd /etc/init.d/
chkconfig --level 35 mysqld on
echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
source /etc/profile
useradd -s /sbin/nologin mysql
chown -R mysql.mysql /usr/local/mysql/
cd /usr/local/mysql/scripts/
/usr/local/mysql/scripts/mysql_install_db --user=mysql --ldata=/var/lib/mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data
sed -i 鈥?6cbasedir=/usr/local/mysql鈥?/etc/init.d/mysqld
sed -i 鈥?7cdatadir=/home/mysql鈥?/etc/init.d/mysqld
service mysqld start
echo "mysql宸插畨瑁呮垚鍔?
以上是关于涓€閿儴缃?---mysql5.6--jue的主要内容,如果未能解决你的问题,请参考以下文章