标签:下载 initial 解压 service linu cmak 1.5 get root
一、安装前准备工作
vi /etc/sysconfig/iptables
service iptables restart
groupadd mysql
mkdir -p /usr/local/mysql
mkdir -p /usr/local/mysql/data
vi /etc/profile
PATH=/usr/local/mysql/bin:$PATH
export PATH
source /etc/profile
yum -y install wget gcc-c++ ncurses-devel cmake make perl autoconf
二、安装mysql
https://pan.baidu.com/s/1MNCwuulAv5-HWWxA83Lcvg
[root@ver ~]# cd mysql5.7xxx
[root@ver ~]#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_TCP_PORT=3306 -DMYSQL_USER=mysql -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost
[root@ver ~]# make && make install
/usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
root@localhost: 2wp?fPp33/Hw
chown -R mysql:mysql /usr/local/mysql
./mysql.server start
alter user ‘root‘@‘localhost‘ identified by ‘123456‘
update user set host=‘%‘ where user=‘root‘ limit 1;
flush privileges;
标签:下载 initial 解压 service linu cmak 1.5 get root
原文地址:https://www.cnblogs.com/lizongti/p/10270325.html