最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

AlmaLinux 9 安裝 MySQL 8.0.32的詳細過程

 更新時間:2023年04月17日 11:49:52   作者:a120608yby  
這篇文章主要介紹了AlmaLinux 9 安裝 MySQL 8.0.32的相關(guān)知識,本文給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

1、配置安裝源

# 安裝
dnf install http://mirrors.ustc.edu.cn/mysql-repo/mysql80-community-release-el9.rpm -y
 
# 修改配置
sed -i 's@http://repo.mysql.com/@http://mirrors.ustc.edu.cn/mysql-repo/@g' /etc/yum.repos.d/mysql-community*.repo

2、安裝MySQL

dnf install -y mysql-community-server

3、配置MySQL

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

4、修改配置文件

[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

5、啟動MySQL

systemctl enable --now mysqld

6、安全配置

# mysql_secure_installation
mysql_secure_installation: [ERROR] unknown variable 'default-character-set=utf8mb4'.
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
The 'validate_password' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Please set the password for root here.
New password: ? ? #輸入密碼
Re-enter new password: ? ? ?#輸入密碼
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
?
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
?- Dropping test database...
Success.
?- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!

到此這篇關(guān)于AlmaLinux 9 安裝 MySQL 8.0.32的文章就介紹到這了,更多相關(guān)AlmaLinux安裝mysql內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • MySQL 備份還原數(shù)據(jù)庫批處理

    MySQL 備份還原數(shù)據(jù)庫批處理

    在日常工作中,我們往往需要對MySQL數(shù)據(jù)庫進行備份,有時可以通過拷貝整個文件,有時通過備份整個庫還有的時候我們就只需要備份某個表。
    2009-07-07
  • linux版mysql8配置表名不區(qū)分大小寫問題

    linux版mysql8配置表名不區(qū)分大小寫問題

    文章介紹了MySQL 8的安裝步驟,包括配置忽略大小寫、備份數(shù)據(jù)、停止和刪除數(shù)據(jù)庫文件、配置my.cnf文件、初始化、啟動服務(wù)和登錄設(shè)置密碼,還討論了在配置遠程連接時遇到的常見問題,特別是MySQL 8版本中由于密碼加密方法變化導(dǎo)致的問題解決方法
    2024-11-11
  • CentOS8下MySQL 8.0安裝部署的方法

    CentOS8下MySQL 8.0安裝部署的方法

    這篇文章主要介紹了CentOS 8下 MySQL 8.0 安裝部署的方法,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-11-11
  • 查看修改mysql編碼方式讓它支持中文(gbk或者utf8)

    查看修改mysql編碼方式讓它支持中文(gbk或者utf8)

    MySQL的默認編碼是Latin1,不支持中文,要支持中文需要把數(shù)據(jù)庫的默認編碼修改為gbk或者utf8,真的是很麻煩啊,不過本文提供了詳細的修改教程,感興趣的你可不要走開啊,希望本文對你有所幫助
    2013-01-01
  • MySQL 的CASE WHEN 語句使用說明

    MySQL 的CASE WHEN 語句使用說明

    本文介紹下,在mysql數(shù)據(jù)庫中,有關(guān)case when語句的用法,介紹了case when語句的基礎(chǔ)知識,并提供了相關(guān)實例,供大家學(xué)習(xí)參考,有需要的朋友不要錯過
    2011-10-10
  • mysql增量備份及斷點恢復(fù)腳本實例

    mysql增量備份及斷點恢復(fù)腳本實例

    生產(chǎn)環(huán)境中在mysql中誤操作是非常正常的,所以就需要用到mysql的增量備份恢復(fù)。增量備份是我們經(jīng)常用到的,它可以指定某個誤操作的時間以及位置點進行數(shù)據(jù)恢復(fù),更加準確的恢復(fù)我們想要還原的數(shù)據(jù)。
    2018-09-09
  • 你需要理解的關(guān)于MySQL的鎖知識

    你需要理解的關(guān)于MySQL的鎖知識

    鎖是MySQL里面最難理解的知識,但是又無處不在。一開始接觸鎖的時候,感覺被各種鎖類型和名詞弄得暈頭轉(zhuǎn)向,下面小編來簡單介紹一下
    2019-05-05
  • MySQL定時備份數(shù)據(jù)庫操作示例

    MySQL定時備份數(shù)據(jù)庫操作示例

    這篇文章主要介紹了MySQL定時備份數(shù)據(jù)庫操作,結(jié)合實例形式分析了MySQL定時備份數(shù)據(jù)庫相關(guān)命令、原理、實現(xiàn)方法及操作注意事項,需要的朋友可以參考下
    2020-03-03
  • MySQL慢查詢SQL優(yōu)化方式

    MySQL慢查詢SQL優(yōu)化方式

    這篇文章主要介紹了MySQL慢查詢SQL優(yōu)化方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2025-04-04
  • MySQL刪除表數(shù)據(jù)與MySQL清空表命令的3種方法淺析

    MySQL刪除表數(shù)據(jù)與MySQL清空表命令的3種方法淺析

    刪除現(xiàn)有MySQL表非常容易,但是刪除任何現(xiàn)有的表時要非常小心,因為刪除表后丟失的數(shù)據(jù)將無法恢復(fù),下面這篇文章主要給大家介紹了關(guān)于MySQL刪除表數(shù)據(jù)與MySQL清空表命令的3種方法的相關(guān)資料,需要的朋友可以參考下
    2022-08-08

最新評論

义乌市| 惠来县| 民权县| 鄂托克旗| 锡林浩特市| 泉州市| 南皮县| 吴旗县| 濉溪县| 紫金县| 精河县| 苏尼特右旗| 抚宁县| 龙井市| 天门市| 那坡县| 京山县| 德保县| 广汉市| 盐津县| 岚皋县| 林周县| 大悟县| 富裕县| 张家口市| 山阳县| 东乡县| 广灵县| 香港 | 阜康市| 尚义县| 晴隆县| 庆元县| 疏附县| 南安市| 贵港市| 巴林左旗| 达州市| 西藏| 吉首市| 两当县|