这里安装我用的的是Mysql二进制包,主要减少编译安装的时间,当然快的还有yum的安装方式。mysql个版本下载地址:Http://mirrors.sohu.com/mysql/ 1、解决相关依赖
这里安装我用的的是Mysql二进制包,主要减少编译安装的时间,当然快的还有yum的安装方式。
mysql个版本下载地址:Http://mirrors.sohu.com/mysql/
yum install -y perl-Module-Install.noarch libaio*
tar xf mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz -C /usr/local/src/
cd /usr/local/src/mysql-5.6.34-linux-glibc2.5-x86
ln -sv /usr/local/src/mysql-5.6.34-linux-glibc2.5-x86_64 /usr/local/mysql
cd /usr/local/mysql/
useradd mysql -s /sbin/nologin
chown -R mysql.mysql ./* –R
mkdir /data/mysql && chown mysql.mysql /data/mysql –R
/usr/local/mysql/scripts/mysql_install_db --user=mysql --datadir=/data/mysql --basedir=/usr/local/mysql/
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
cp /usr/local/mysql/my.cnf /etc/my.cnf
ln -sv /usr/local/mysql/bin/mysql /usr/bin/
/etc/init.d/mysql restart
[root@localhost ~]# /usr/local/mysql/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.6.34 MySQL CommUnity Server (GPL)
Copyright (c) 2000, 2016, oracle and/or its affiliates. All rights reserved.
Oracle is a reGIStered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
--结束END--
本文标题: Centos7.1部署mysql-5.6.34(笔记)
本文链接: https://www.lsjlt.com/news/36578.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0