国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

mysql 8.0.18 安裝配置方法圖文教程(linux)

2024-07-24 12:41:29
字體:
供稿:網(wǎng)友

本文記錄了linux mysql 8.0.18 安裝配置圖文教程,供大家參考,具體內(nèi)容如下

1、官網(wǎng)安裝包下載地址

2、我這里通過xftp將安裝包上傳至Linux服務(wù)器

3.解壓

解壓命令:tar -xvf mysql-8.0.18-linux-glibc2.12-x86_64.tar

繼續(xù)解壓需要的那一個

命令: tar -xvf mysql-8.0.18-linux-glibc2.12-x86_64.tar.xz

重命名并移動到合適的路徑

重命名 : mv mysql-8.0.18-linux-glibc2.12-x86_64 mysql

移動:


4.在/usr/local/mysql下創(chuàng)建data文件夾

# mkdir data

5.初始化數(shù)據(jù)庫,自動生成密碼 需記錄 等下要用

# bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

ps:中間遇到一個坑,初始化數(shù)據(jù)庫時候報了錯

具體錯誤為:bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

解決方法為:yum install libaio-devel.x86_64 原因是缺少了libaio這個東西 安裝就完事了

再次執(zhí)行初始化命令

得到初始化密碼,需要記下,一會會用到

6.修改/usr/local/mysql 當(dāng)前目錄的用戶

# chown -R root:root ./# chown -R mysql:mysql data

7.復(fù)制my-default.cnf這個文件到etc/my.cnf去

具體命令為:

# cd support-files/# touch my-default.cnf# chmod 777 ./my-default.cnf # cd ../# cp support-files/my-default.cnf /etc/my.cnf

8.完了之后配置my.cnf

vim /etc/my.cnf

內(nèi)容:

[mysqld]# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set, remove the # and set as required.basedir = /usr/local/mysqldatadir = /usr/local/mysql/datasocket = /tmp/mysql.socklog-error = /usr/local/mysql/data/error.logpid-file = /usr/local/mysql/data/mysql.pidtmpdir = /tmpport = 5186#lower_case_table_names = 1# server_id = .....# socket = .....#lower_case_table_names = 1max_allowed_packet=32Mdefault-authentication-plugin = mysql_native_password#lower_case_file_system = on#lower_case_table_names = 1log_bin_trust_function_creators = ON# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 诸暨市| 石城县| 博湖县| 文山县| 女性| 兴宁市| 诏安县| 盐源县| 搜索| 沙湾县| 黄平县| 元氏县| 无为县| 馆陶县| 闻喜县| 甘孜| 中江县| 肥城市| 黄骅市| 临武县| 朝阳区| 怀远县| 宜都市| 中西区| 屏南县| 广元市| 泗水县| 宁河县| 宕昌县| 会泽县| 合江县| 桓台县| 扶余县| 闻喜县| 新源县| 沙洋县| 都兰县| 绍兴县| 农安县| 公主岭市| 莲花县|