mysql 5.7源码安装(完整)
源码方式安装http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.7/mysql-5.7.26.tar.gzmysql-5.7.26.tar.gzmkdir -p /usr/local/boostwgethttp://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0
·
源码方式安装
http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.7/mysql-5.7.26.tar.gz
mysql-5.7.26.tar.gz
mkdir -p /usr/local/boost
wget http://www.sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
tar -xvzf boost_1_59_0.tar.gz
mv boost_1_59_0 /usr/local/boost
yum -y install ncurses-devel openssl-develyum -y install tcp_wrappers-devel bison-devel bison makeyum -y install gcc-c++yum -y install cmake
编译安装
#cmake . -DCMAKE_INSTALL_PREFIX=/soft/mysql -DMYSQL_DATADIR=/soft/mysql/data -DSYSCONFDIR=/etc -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_SSL:STRING=bundled -DWITH_ZLIB:STRING=bundled -DWITH_LIBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DCURSES_LIBRARY=/lib64/libncurses.so -DWITH_BOOST=/usr/local/boost#make && make install
useradd -s /sbin/nologin mysql
/soft/mysql/bin/mysql_install_db --basedir=/soft/mysql/ --datadir=/soft/mysql/data --user=mysql
cd mysql-5.7.26
cp support-files/mysql.server /etc/init.d/mysqld
恢复
wget "http://rdsbak-shangjiu--dd.oss-cn-shanghai-internal.aliyuncs.com/custins7153079/hins4920555_data_20190617143041.tar.gz?OSSAccessKeyId=LTAIyKzxtSYNknVO&Expires=1560934578&Signature=Jz7W6NKOQXXSwf2npzUqh8kJt4M%3D"
http://rdsbak-shangjiu-dd3.oss-cn-shanghai-internal.aliyuncs.com/custins9086989/hins5464435_data_20190918034504.tar.gz?OSSAccessKeyId=LTAIyKzxtSYNknVO&Expires=1560934578&Signature=Jz7W6NKOQXXSwf2npzUqh8kJt4M%3D
mv hins4920555_data_20190617143041.tar.gz\?OSSAccessKeyId\=LTAIyKzxtSYNknVO\&Expires\=1560934578\&Signature\=Jz7W6NKOQXXSwf2npzUqh8kJt4M\= hins4920555_data_20190617143041.tar.gz
tar zxvf hins4920555_data_20190617143041.tar.gz
阿里云数据库的账号的解决方案
https://help.aliyun.com/knowledge_detail/41701.html?spm=5176.11065259.1996646101.searchclickresult.22cf5cc9kjK0pu
docker数据库主从解决方案
https://www.cnblogs.com/songwenjie/p/9371422.html
主从同步失败UUID解决方案
https://blog.csdn.net/sunbocong/article/details/81634296
恢复工具下载
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.8/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.8-1.el7.x86_64.rpm
yum localinstall percona-xtrabackup-24-2.4.8-1.el7.x86_64.rpm
压缩包解压缩在/opt下
恢复第一步:应用日志
innobackupex --defaults-file=/etc/my.cnf --user=root --apply-log /opt/
恢复第二步:拷贝文件
innobackupex --defaults-file=/etc/my.cnf --user=root --copy-back /opt/
yum方式安装mysql5.7
wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
rpm -Uvh mysql57-community-release-el7-10.noarch.rpm
yum install -y mysql-community-server
systemctl restart mysqld.service
grep 'temporary password' /var/log/mysqld.log
首先,修改validate_password_policy参数的值
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;
mysql> alter user 'root'@'localhost' identified by '123456';
mysql> grant all privileges on *.* to 'root'@'%'identified by '123456';
mariadb安装
yum -y install mariadb*
systemctl start mariadb
CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON jiradb.* TO 'root'@'%' IDENTIFIED BY '123456';
线上数据库的创建
create database xm_classroom_course charset utf8mb4;
设置一个SELinux即可
setenforce 0
阿里云账号限制去掉解决方案
https://help.aliyun.com/knowledge_detail/41701.html?spm=5176.11065259.1996646101.searchclickresult.22cf5cc9kjK0pu
docker mysql主从解决方案
https://www.cnblogs.com/songwenjie/p/9371422.html
mysql主从同步失败解决方案
https://blog.csdn.net/sunbocong/article/details/81634296
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献27条内容
所有评论(0)