1.官网下载源码 2.解压 tar zxvf mysql-5.7.10.tar.gz
sudo yum install cmake gcc-c++ ncurses-devel perl-Data-Dumper
wget http://jaist.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.zip
cmake .
make
sudo make install mysql将会安装到/usr/local/mysql路径。
sudo groupadd mysql
cd /usr/local/ [python] view plaincopy bin/mysql_ssl_rsa_setup 至此,mysql就可以启动运行了。
CentOS7自带MariaDB的支持,/etc下默认存在my.cnf文件干扰mysql运行,需要先删掉 cd /etc 然后再/etc下重建my.cnf文件,内容如下 # For advice on how to change settings please see [mysqld] # Remove leading # and set to the amount of RAM for the most important data # Remove leading # to turn on a very important data integrity option: logging # These are commonly set, remove the # and set as required. # Remove leading # to set options mainly useful for reporting servers. # max_connection = 10000 #binary log #slow query log 现在可以启动mysql了 sudo /usr/local/mysql/bin/mysqld_safe --user=mysql & CentOS7 不能使用service控制mysql服务,而源码安装的mysql也没有提供Systemd的控制脚本。 于是编辑/etc/rc.d/rc.local文件,添加mysql的开机启动命令。 /usr/local/mysql/bin/mysqld_safe --user=mysql & 然后给/etc/rc.d/rc.local添加可执行权限 sudo chmod a+x /etc/rc.d/rc.local
/usr/loca/mysql/bin/mysql -uroot
|
本文出自 “11027868” 博客,请务必保留此出处http://11037868.blog.51cto.com/11027868/1902415
原文:http://11037868.blog.51cto.com/11027868/1902415