源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Centos7 下Mysql5.7.19安装教程详解

  • 时间:2020-10-20 16:32 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Centos7 下Mysql5.7.19安装教程详解
[b]1、下载[/b] 从官网下载mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz,版本为5.7.19 下载地址: root@localhost:3&  [b]10、创建日志文件目录[/b]
mkdir -p /data/mysql/log/mariadb/
cd /data/mysql/log/mariadb/
touch mariadb.log
chmod -R 775 mariadb.log
chown -R mysql:mysql mariadb.log
chown -R mysql:mysql /data/mysql
[b]11、启动mysql服务[/b]
/data/mysql/support-files/mysql.server start
[b]12、登录msyql,输入密码(密码为第9步骤的初始化密码)[/b]
#mysql -u root -p
[b]13、 修改密码为“123456”[/b]
msql>alter user 'root'@'localhost' identified by '123456';
mysql>use mysql;
msyql>update user set user.Host='%' where user.User='root';
mysql>flush privileges;
mysql>quit
[b]14、修改/etc/my.cnf文件[/b]
# instructions in http://fedoraproject.org/wiki/Systemd
socket=/tmp/mysql.sock
[mysqld]
datadir=/data/mysql/data
socket=/tmp/mysql.sock
max_connections=1000
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/data/mysql/log/mariadb/mariadb.log
pid-file=/data/mysql/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
修改标红部分内容。 [b]总结[/b] 以上所述是小编给大家介绍的Centos7 下Mysql5.7.19安装教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对编程素材网网站的支持!
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部