apt-get install libbz2-dev libgd2-xpm-dev libzzip-dev autoconf libpcre3-dev libssl-dev zlib1g-dev libcurl4-openssl-dev libtidy-dev libxml2-dev libsasl2-dev libmcrypt-dev libltdl-dev cmake -y
#install mysql
cd /root/${MYSQL}
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/var/mysql/ -DMYSQL_UNIX_ADDR=/var/mysql/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1-DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=3306 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8-general_ci -DMYSQL_UNIX_ADDR=/var/mysql/mysql.sock -DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=0
make;make install
cd support-files
chmod +x mysql.server
cp mysql.server /etc/init.d/mysql
#初始化Mysql
/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &
#启动mysql
/usr/local/mysql/bin/mysqld_safe &
#查看进程和状态
ps -ef |grep mysql
阅读(2081) | 评论(1) | 转发(0) |