首页 > 数据库 >Rocky Linux 9 离线安装 MySQL 8.0

Rocky Linux 9 离线安装 MySQL 8.0

时间:2023-04-26 11:58:20浏览次数:27  
标签:8.0 Rocky buffer 离线 innodb log mysql size

1、离线安装包下载

https://dev.mysql.com/downloads/mysql/5.5.html?os=31&version=5.1

2、解压并安装

# 解压
tar xf mysql-8.0.33-1.el9.x86_64.rpm-bundle.tar

# 安装MySQL
dnf -y localinstall mysql-community-common-8.0.33-1.el9.x86_64.rpm
dnf -y localinstall mysql-community-client-plugins-8.0.33-1.el9.x86_64.rpm 
dnf -y localinstall mysql-community-libs-8.0.33-1.el9.x86_64.rpm 
dnf -y localinstall mysql-community-client-8.0.33-1.el9.x86_64.rpm 
dnf -y localinstall mysql-community-icu-data-files-8.0.33-1.el9.x86_64.rpm 
dnf -y localinstall mysql-community-server-8.0.33-1.el9.x86_64.rpm 

3、修改配置

# vim /etc/my.cnf
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set = utf8mb4

[mysql]
prompt="MySQL [\d]> "
no-auto-rehash

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
default_authentication_plugin = mysql_native_password

datadir = /var/lib/mysql
pid-file = /var/lib/mysql/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1

init-connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4
collation-server = utf8mb4_0900_ai_ci

skip-name-resolve
#skip-networking
back_log = 300

max_connections = 5295
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 1024
max_allowed_packet = 500M
binlog_cache_size = 1M
max_heap_table_size = 8M
tmp_table_size = 128M

read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 8M
join_buffer_size = 8M
key_buffer_size = 256M

thread_cache_size = 64

ft_min_word_len = 4

log_bin = mysql-bin
binlog_format = row
binlog_expire_logs_seconds = 604800

log_error = /var/lib/mysql/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/lib/mysql/mysql-slow.log

performance_schema = 0
explicit_defaults_for_timestamp

lower_case_table_names = 1

skip-external-locking

default_storage_engine = InnoDB
#default-storage-engine = MyISAM
innodb_file_per_table = 1
innodb_open_files = 500
innodb_buffer_pool_size = 1024M
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_thread_concurrency = 0
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 2M
innodb_log_file_size = 32M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 10G

interactive_timeout = 28800
wait_timeout = 28800

binlog_rows_query_log_events = 1
log_bin_trust_function_creators = 1
log_timestamps = SYSTEM

sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
#sql_mode = NO_AUTO_VALUE_ON_ZERO
innodb_strict_mode = 0
plugin-load=mysql_clone.so

[mysqldump]
quick
max_allowed_packet = 500M

[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 8M
read_buffer = 4M
write_buffer = 4M

4、取消初始化密码

if [ ! "$(cat /usr/bin/mysqld_pre_systemd | grep -v ^\# | grep initialize-insecure )" ]; then
    sed -i "s@--initialize @--initialize-insecure @g" /usr/bin/mysqld_pre_systemd
fi

5、启动服务

systemctl enable --now mysqld

  

标签:8.0,Rocky,buffer,离线,innodb,log,mysql,size
From: https://www.cnblogs.com/a120608yby/p/17355189.html

相关文章

  • win10安装openssh失败,使用离线安装包
    在win平台使用openssh时,需要安装openssh的客户端和服务端。有时使用微软官方推荐的设置-应用-可选应用安装时会出错,重启也不能解决。这时建议使用离线安装包一键安装。github安装包链接:Releases·PowerShell/Win32-OpenSSH(github.com)https://github.com/PowerShell/Win32-......
  • ios apns推送 离线锁屏语音播报
    一、背景公司正在研发的一款App,需要在进行消息推送时支持语音播报。具体要求:离线:App在用户未打开时,可收到消息推送锁屏:用户在设备锁屏状态下,仍可收到消息推送语音播报:收到消息推送时可同时进行语音播放苹果的APNs消息推送,支持在应用未打开及设备锁屏状态下收到推送。而......
  • Linux(CentOS7)安装与卸载MySQL8.0图文详解
    Mysql数据库的安装对于开发者来说,是我们必然会面对的问题,它的安装过程其实并不复杂,并且网络上的安装教程也非常多,但是对于新手来说,各种不同形式的安装教程,又给新手们带来了要选择哪种方式进行安装的难题,而且很多时候按照教程也没有能够安装成功,安装过程出现各种各样的错误。下面......
  • The binary version of its metadata is 1.8.0, expected version is 1.5.1.
    C:/Users/sdt16354/.gradle/caches/transforms-3/b92f389f516aa233b37ae70b7a7c1337/transformed/jetified-annotation-jvm-1.6.0.jar!/META-INF/annotation.kotlin_module:ModulewascompiledwithanincompatibleversionofKotlin.Thebinaryversionofitsmetadata......
  • OpenAI的离线音频转文本模型 Whisper 的.NET封装项目
    whisper介绍OpenAI在2022年9月21日开源了号称其英文语音辨识能力已达到人类水准的Whisper神经网络,且它亦支持其它98种语言的自动语音辨识。Whisper系统所提供的自动语音辨识(AutomaticSpeechRecognition,ASR)模型是被训练来运行语音辨识与翻译任务的,它们能将各种语言的语音变成文......
  • Vue学习笔记之Node Sass version 8.0.0 is incompatible with 4.0.0错误
    输入以下两个命令:npmuninstallnode-sassnpmi-Dsass注:Mac环境如果进行了系统升级,需要重新安装Xcode,执行命令xcode-selectinstall不然会出现如下的错误Mac解决gyp:NoXcodeorCLTversiondetected!报错 如果出现python2的错误gypverb`which`failedE......
  • 离线询问
    -https://ac.nowcoder.com/acm/contest/54877/D观察题目,以猫猫的友善值为横坐标,与猫猫期望的友善值为纵坐标,则人类的友善值为纵坐标,期待的友善值为横坐标问题就转换为了求猫猫坐标左上角的最左上的人类坐标点对猫猫以坐标形式排个序,遍历每个猫猫,在遍历过程中维护最左上角的人......
  • DataX-阿里开源离线同步工具在Windows上实现Sqlserver到Mysql全量同步和增量同步
    场景Kettle-开源的ETL工具集-实现SqlServer到Mysql表的数据同步并部署在Windows服务器上:https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/119891674上面讲过Kettle的使用,下面记录下阿里开源异构数据源同步工具DataXDataXDataX是一个异构数据源离线同步工具,致力......
  • VS2019离线下载安装
    移步https://learn.microsoft.com/en-us/visualstudio/install/create-a-network-installation-of-visual-studio?view=vs-2019#download-the-visual-studio-bootstrapper-to-create-the-network-layout安装步骤......
  • 基于Canal实现MySQL 8.0 数据库数据同步
    前言服务器说明主机名称操作系统说明192.168.11.82Ubuntu22.04主库所在服务器192.168.11.28OracleLinuxServer8.7从库所在服务器版本说明MySQL版本:MySQL_8.0.32Canal版本:Canal_1.1.7//我的canal安装部署在192.168.11.82上,当然你也可以部......