MySQL 5.7.18 在centos下安装记录
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MySQL 5.7.18 在centos下安装记录,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3769字,纯文字阅读大概需要6分钟。
内容图文
![MySQL 5.7.18 在centos下安装记录](/upload/InfoBanner/zyjiaocheng/489/c71ea008bb1b469393f5369419d066a8.jpg)
一个朋友找我如何在Linux下安装mysql5.7.18,我稍微整理下了下记录,如下:
下载地址:
MySQL5.7.18参数官方网址:https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_user_connections,下载完后的包是MySQL-5.7.18-linux-glibc2.5-x86_64.tar.gz
上面的网址如果找不到,就来百度云盘下载:链接: https://pan.baidu.com/s/1bECiEM 密码: c2my
安装脚本myql_install_5.7.18.sh,可以执行脚本,实现这个一键式安装好mysql5.7.18:
#!/bin/bash
# install the basie lib
useradd mysql
yum install cmake -y
yum install -y libtoolize
yum install gcc gcc-c++ -y
yum install -y ncurses-devel.x86_64
yum install -y cmake.x86_64
yum install -y libaio.x86_64
yum install -y bison.x86_64
yum install -y gcc-c++.x86_64
# unzip
rm -rf /usr/local/mysql-5.7.18*
tar -xvf mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz -C /usr/local
mv /usr/local/mysql-5.7.18-linux-glibc2.5-x86_64 /usr/local/mysql3308
cp my.cnf /tmp/
cp /tmp/my.cnf /usr/local/mysql3308/my.cnf
# add mysql account,create the basic directory
rm -rf /home/data/mysql3308/data
mkdir -p /home/data/mysql3308/data
cd /home/data/mysql3308/data
chown -R mysql:mysql /usr/local/mysql3308
mkdir -p /home/data/mysql3308/binlog/
chown -R mysql:mysql /home/data/mysql3308/binlog/
# init databases
rm -rf /home/data/mysql3308/data/*
cd /usr/local/mysql3308/
time /usr/local/mysql3308/bin/mysqld --defaults-file=/usr/local/mysql3308/my.cnf --initialize-insecure --user=mysql
# “MySQL Enterprise Audit Security Considerations”
#mkdir -p /home/data/mysql/data/ssl/
chown -R mysql:mysql /home/data/mysql/data/ssl
cd /usr/local/mysql3308/
time bin/mysql_ssl_rsa_setup --datadir=/home/data/mysql/data/ssl/
# set the auto start on linux server started
rm -rf /etc/init.d/mysqld3308*
cp support-files/mysql.server /etc/init.d/mysqld3308
chmod 700 /etc/init.d/mysqld3308
echo "export PATH=$PATH:/usr/local/mysql3308/bin">>/etc/profile
chkconfig --add mysqld3308
source /etc/profile
vim /etc/init.d/mysqld3308
basedir=/usr/local/mysql3308
datadir=/home/data/mysql3308/data
# start the mysql server
echo "" > /usr/local/mysql3308/mysqld.log
chown -R mysql:mysql /usr/local/mysql3308/mysqld.log
service mysqld3308 start
启动报错:
[root@mydb1 mysql3308]# service mysqld3308 start
Starting MySQL SUCCESS!
[root@mydb1 mysql3308]# 170605 15:26:25 mysqld_safe A mysqld process already exists
[root@mydb1 mysql3308]#
后台error日志里面的启动报错信息:
2017-06-05T09:09:32.291104Z 0 [Note] Plugin ‘FEDERATED‘ is disabled.
2017-06-05T09:09:32.292966Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170605 17:09:32
2017-06-05T09:09:32.304707Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2017-06-05T09:09:32.304749Z 0 [Note] Server hostname (bind-address): ‘*‘; port: 3306
2017-06-05T09:09:32.304902Z 0 [Note] IPv6 is available.
2017-06-05T09:09:32.304930Z 0 [Note] - ‘::‘ resolves to ‘::‘;
2017-06-05T09:09:32.304964Z 0 [Note] Server socket created on IP: ‘::‘.
2017-06-05T09:09:32.305012Z 0 [ERROR] Can‘t start server: Bind on TCP/IP port: Address already in use
2017-06-05T09:09:32.305023Z 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2017-06-05T09:09:32.305041Z 0 [ERROR] Aborting
2017-06-05T09:09:32.305060Z 0 [Note] Binlog end
解决方法,以下2个操作即可
vim /etc/init.d/mysqld3308
(1)将basedir和datadir变成下面
basedir=/usr/local/mysql3308
datadir=/home/data/mysql3308/data
(2)
把所有的/usr/local/mysql变成/usr/local/mysql3308
然后重启搞定。
MySQL 5.7.18 在centos下安装记录
标签:安装mysql buffer sql 信息 tmp max ddr audit 百度
本文系统来源:http://www.cnblogs.com/xiaoliu500/p/7350204.html
内容总结
以上是互联网集市为您收集整理的MySQL 5.7.18 在centos下安装记录全部内容,希望文章能够帮你解决MySQL 5.7.18 在centos下安装记录所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。