香港云主机最佳企业级服务商!

ADSL拨号VPS包含了中国大陆(联通,移动,电信,)

中国香港,国外拨号VPS。

当前位置:云主机 > MYSQL >

电信ADSL拨号VPS
联通ADSL拨号VPS
移动ADSL拨号VPS

Centos7.5安装mysql5.7.24二进制包方式部署


时间:2020-11-03 13:38 作者:admin610456


一、环境准备:

操作系统:CentOS Linux release 7.5.1804 (Core)

mysql/' target='_blank'>mysql版本:MySQL-5.7.24-linux-glibc2.12-x86_64.tar.gz

IP:172.16.8.247

二、mysql5.7二进制安装

1、安装依赖包

yum -y install libaio

2、安装mysql软件

下载软件包:

https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz

tar -xvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz -C ../cd ..mv mysql-5.7.24-linux-glibc2.12-x86_64/ mysql5.7useradd -s /sbin/nologin -M mysqlmkdir -p /app/mysql5.7/{etc,logs,tmp}

3、初始化数据

bin/mysqld --initialize --basedir=/app/mysql5.7/ --datadir=/app/mysql5.7/data --user=mysql# bin/mysqld --initialize --basedir=/app/mysql5.7/ --datadir=/app/mysql5.7/data --user=mysql2018-11-25T03:03:16.299117Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).2018-11-25T03:03:16.946059Z 0 [Warning] InnoDB: New log files created, LSN=457902018-11-25T03:03:17.033699Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.2018-11-25T03:03:17.089657Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: a7fef663-f05e-11e8-b1f5-08002728f0e4.2018-11-25T03:03:17.090377Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.2018-11-25T03:03:17.090784Z 1 [Note] A temporary password is generated for root@localhost: m:fw/7on%>Bh

4、修改配置文件

chown -R mysql .vim /app/mysql5.7/etc/my.cnf[mysqld]daemonize = onuser = mysqlport = 3306basedir = /app/mysql5.7datadir = /app/mysql5.7/datasocket = /tmp/mysql.sockbind-address = 0.0.0.0pid-file = /app/mysql5.7/tmp/mysqld.pidcharacter-set-server = utf8collation-server = utf8_general_cimax_connections = 2408log-error = /app/mysql5.7/logs/mysqld.log

5、systemd启动MYSQL服务

vim /lib/systemd/system/mysqld.service[Unit]Description=MySQL ServerDocumentation=man:mysqld(8)Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.htmlAfter=network.targetAfter=syslog.target[Install]WantedBy=multi-user.target[Service]User=mysqlGroup=mysqlType=forkingTimeoutSec=0PermissionsStartOnly=trueExecStart=/app/mysql5.7/bin/mysqld --defaults-file=/app/mysql5.7/etc/my.cnfLimitNOFILE = 5000Restart=on-failureRestartPreventExitStartus=1PrivateTmp=false

6、启动服务

systemctl restart mysqldsystemctl enable mysqld

7、修改mysql root密码

vim /etc/profileexport PATH=$PATH:/app/mysql5.7/binsource /etc/profilemysql -uroot -palter user 'root'@'localhost' IDENTIFIED BY 'Devops@2018';

总结

以上所述是小编给大家介绍的Centos7.5安装mysql5.7.24二进制包方式部署,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

(责任编辑:admin)






帮助中心
会员注册
找回密码
新闻中心
快捷通道
域名登录面板
虚机登录面板
云主机登录面板
关于我们
关于我们
联系我们
联系方式

售前咨询:17830004266(重庆移动)

企业QQ:383546523

《中华人民共和国工业和信息化部》 编号:ICP备00012341号

Copyright © 2002 -2018 香港云主机 版权所有
声明:香港云主机品牌标志、品牌吉祥物均已注册商标,版权所有,窃用必究

云官方微信

在线客服

  • 企业QQ: 点击这里给我发消息
  • 技术支持:383546523

  • 公司总台电话:17830004266(重庆移动)
  • 售前咨询热线:17830004266(重庆移动)