centos7 安装mysql8 绿色版

wget -c https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz

xz -d mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz

tar xvf mysql-8.0.16-linux-glibc2.12-x86_64.tar

mv mysql-8.0.16-linux-glibc2.12-x86_64 /usr/local/mysql8

cd /usr/local/mysql8

mkdir data

rm /etc/my.cnf

mkdir etc

groupadd mysql
useradd -r -g mysql mysql
chown -R mysql:mysql /usr/local/mysql8

cp /usr/local/mysql8/support-files/mysql.server /etc/init.d/mysql.server

vi /etc/init.d/mysql.server
basedir=/usr/local/mysql8
datadir=/usr/local/mysql8/data

vi /usr/local/mysql8/etc/my.cnf

[client]
port = 3306
socket = /tmp/mysql.sock

[mysqld]
user = mysql
server-id = 1
port = 3306
basedir = /usr/local/mysql8
datadir = /usr/local/mysql8/data
pid-file = /usr/local/mysql8/log/mysql.pid
tmpdir = /tmp
socket = /tmp/mysql.sock
max_connections = 400
max_connect_errors = 1000
max_allowed_packet = 128M
interactive_timeout = 1800
wait_timeout = 1800
tmp_table_size = 134217728
max_heap_table_size = 134217728
log_error = /usr/local/mysql8/log/error.log
slow_query_log = 1
slow_query_log_file = /usr/local/mysql8/log/slow.log
log_queries_not_using_indexes = 1
log_throttle_queries_not_using_indexes = 5
log_slow_slave_statements = 1
long_query_time = 8
min_examined_row_limit = 100
expire_logs_days = 5

/usr/local/mysql8/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql8 --datadir=//usr/local/mysql8/data
(保存临时密码)

mv /usr/local/mysql8/etc/my.cnf /etc/

touch /usr/local/mysql8/log/error.log

touch /usr/local/mysql8/log/slow.log

touch /usr/local/mysql8/log/mysql.pid

chown -R mysql:mysql /usr/local/mysql8/log/error.log /usr/local/mysql8/log/slow.log /usr/local/mysql8/log/mysql.pid

service mysql.server start

#登录
mysql -uroot -p

#重启设置密码
ALTER USER ‘root‘@‘localhost‘ identified by ‘123456‘;
flush privileges;

原文地址:https://blog.51cto.com/quietnight/2413039

时间: 2024-10-17 20:55:28

centos7 安装mysql8 绿色版的相关文章

司机助推器Driver Booster V1.4.0.61安装和绿色版

驱动增压免费 最有效和最容易使用的驱动程序更新 免费下载安装版 V 1.4.0.61 | 15.7 MB 支持Windows XP/Vista/7/8 提取密码:1ai4 立即下载绿色版 什么 驱动增压器免费呢? 过时的驱动程序可能会严重影响电脑的性能,并导致系统崩溃. 驱动增压免费,设计的IObit最先进的驱动程序更新的技术,扫描和自动识别过时的驱动程序,并下载和只需点击一下安装正确的更新为您,为您节省大量的时间. 此外,该驱动程序更新是专门设计来调整驱动程序以获得最佳的游戏性能. 这是正确的

windows 免安装mysql绿色版配置

MySQL绿色版安装 1.下载地址 https://dev.mysql.com/downloads/mysql/ 2.配置my.ini 文件 解压下载文件到指定目录.如: my.ini文件内容: [mysql] default-character-set=utf8 [mysqld] basedir=C:\Users\venn\mysql-5.7.18-winx64 datadir=C:\Users\venn\mysql-5.7.18-winx64\data port=3306 max_conne

linux centos7安装mysql8

一.RPM版安装 查看是否有其他版本的数据库,若有,删除干净 非root用户必须要有sudo权限 1.下载mysql相关安装包 https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql80-community-el7/mysql-community-server-8.0.18-1.el7.x86_64.rpm https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql80-community-el7/m

通过yum源在centOS7安装mysql8

1.去官网下载rpm文件,该文件专门用于yum安装方式: 到官网https://www.mysql.com/downloads/下载社区版Community(针对个人),如下图: 然后拉到最下面,我下载的是第一个:Red Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent),因为我虚拟机装的是centOS7,所以 我下载的是这个版本的,有兴趣的朋友可以下载其他的版本. 2.下载好rpm文件之后使用文件传输工具连接虚拟

centos7安装mysql8.0

MySQL 8 正式版 8.0.11 已发布,官方表示 MySQL 8 要比 MySQL 5.7 快 2 倍,还带来了大量的改进和更快的性能! mysql8.0安装步骤: 1.添加yum安装库 安装库的下载地址:https://repo.mysql.com//mysql80-community-release-el7-2.noarch.rpm wget https://repo.mysql.com//mysql80-community-release-el7-2.noarch.rpm rpm -

centos7 安装 mysql-8.0

本文介绍使用rpm包安装mysql, 以 mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar 为例: 1.下载 MySQL下载地址:https://dev.mysql.com/downloads/mysql/ 可以直接在centos里面用wget命令下载,或者在自己电脑上下完再传上去 2.解压tar包 tar -xvf mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar 3.移除centos7自带的mariadb-libs包,不移除的话

Centos7安装mysql8教程

网上的教程很多,我也参考了很多,以下是我实践的步骤,真实有效. 1.配置Mysql 8.0安装源: sudo rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 2.安装Mysql 8.0 sudo yum --enablerepo=mysql80-community install mysql-community-server 以下都选y 看到complete就是安装完啦,是不是很简单? 3

Centos7安装Mysql8

1. Centos7默认安装了mariadb,需要卸载:通过 yum search mysql命令可以看到 mariadb-lib.x86_64,yum remove mariadb-lib.x86_64 2. 下载Mysql源:wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm 3. 安装源:yum localinstall mysql80-community-release-el7-3.noarc

centos7安装mysql-8.0.15

1.获取mysql   wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz   (安装wget命令:yum install wget -y)2.解压mysql   xz -d mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz   tar -xvf mysql-8.0.15-linux-glibc2.12-x86_64.tar3.移动文件