婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > mysql 8.0.18 安裝配置方法圖文教程(linux)

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

熱門標(biāo)簽:常州網(wǎng)絡(luò)外呼系統(tǒng)開(kāi)發(fā) 安徽ai電話電銷機(jī)器人有效果嗎 400電話申請(qǐng)信用卡 萊西市地圖標(biāo)注 外呼系統(tǒng)電銷受騙 在哪里申請(qǐng)400電話 銷售語(yǔ)音電話機(jī)器人 巫師三血與酒地圖標(biāo)注 走過(guò)哪個(gè)省地圖標(biāo)注

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

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

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

3.解壓

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

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

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

重命名并移動(dòng)到合適的路徑

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

移動(dòng):


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

# mkdir data

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

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

ps:中間遇到一個(gè)坑,初始化數(shù)據(jù)庫(kù)時(shí)候報(bào)了錯(cuò)

具體錯(cuò)誤為: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這個(gè)東西 安裝就完事了

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

得到初始化密碼,需要記下,一會(huì)會(huì)用到

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

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

7.復(fù)制my-default.cnf這個(gè)文件到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/mysql
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sock
log-error = /usr/local/mysql/data/error.log
pid-file = /usr/local/mysql/data/mysql.pid
tmpdir = /tmp
port = 5186
#lower_case_table_names = 1
# server_id = .....
# socket = .....
#lower_case_table_names = 1
max_allowed_packet=32M
default-authentication-plugin = mysql_native_password
#lower_case_file_system = on
#lower_case_table_names = 1
log_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

如果后期mysql運(yùn)行報(bào)錯(cuò),可以直接到log-error = /usr/local/mysql/data/error.log目錄下直接查看錯(cuò)誤日志

命令:cat /usr/local/mysql/data/error.log

9.開(kāi)機(jī)自啟,進(jìn)入/usr/local/mysql/support-files進(jìn)行設(shè)置

# cd support-files/
# cp mysql.server /etc/init.d/mysql 
# chmod +x /etc/init.d/mysql

10.注冊(cè)服務(wù)

# chkconfig --add mysql

11.查看是否成功

12.etc/ld.so.conf要配置路徑,不然報(bào)錯(cuò)

# vim /etc/ld.so.conf

添加如下內(nèi)容:

/usr/local/mysql/lib

13.配置環(huán)境變量

# vim /etc/profile
# source /etc/profile

添加如下內(nèi)容:

#MYSQL ENVIRONMENT
export PATH=$PATH:/usr/local/mysql/bin:/usr/local/mysql/lib

14.登錄 需要用到上面的生成的密碼

#啟動(dòng)mysql服務(wù)
[root@localhost bin]# service mysql start
Starting MySQL.Logging to '/usr/local/mysql/data/error.log'.
.. SUCCESS! 
[root@localhost bin]# 
 
#修改mysql密碼
mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.02 sec)
mysql> 

ps:第二個(gè)坑,在啟動(dòng)時(shí)出現(xiàn)錯(cuò)誤 詳情為:
Starting MySQL...The server quit without updating PID file [FAILED]cal/mysql/data/mysql.pid).

該錯(cuò)誤翻了一下午,繞了一大圈,最終問(wèn)題是my.cnf文件配置問(wèn)題,千萬(wàn)不能以為加了#就是注釋掉了,自己檢查了n遍,覺(jué)得沒(méi)有錯(cuò),結(jié)果就是不行,沒(méi)有辦法找了一份另一臺(tái)服務(wù)器的my.cnf配置,復(fù)制替換稍加修改,解決問(wèn)題。

大功告成!可以使用可視化工具進(jìn)行數(shù)據(jù)庫(kù)連接了。

安裝完成。

精彩專題分享:

mysql不同版本安裝教程

mysql5.7各版本安裝教程

mysql5.6各版本安裝教程

mysql8.0各版本安裝教程

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

您可能感興趣的文章:
  • linux 安裝 mysql 8.0.19 詳細(xì)步驟及問(wèn)題解決方法
  • Linux系統(tǒng)MySQL8.0.19快速安裝配置教程圖解
  • linux(Centos7)下安裝mysql8.0.18的教程圖解
  • mysql-5.7.28 在Linux下的安裝教程圖解
  • linux環(huán)境下安裝mysql數(shù)據(jù)庫(kù)的詳細(xì)教程

標(biāo)簽:鞍山 赤峰 果洛 陽(yáng)江 來(lái)賓 煙臺(tái) 河北 黃石

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《mysql 8.0.18 安裝配置方法圖文教程(linux)》,本文關(guān)鍵詞  mysql,8.0.18,安裝,配置,方法,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《mysql 8.0.18 安裝配置方法圖文教程(linux)》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于mysql 8.0.18 安裝配置方法圖文教程(linux)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 康马县| 政和县| 安龙县| 和硕县| 建湖县| 许昌县| 海林市| 肥东县| 阜宁县| 四平市| 阜平县| 济阳县| 双城市| 乐安县| 福泉市| 维西| 碌曲县| 阿拉善右旗| 保亭| 拜城县| 额尔古纳市| 芦溪县| 饶平县| 顺平县| 南郑县| 久治县| 金湖县| 辽源市| 辉县市| 南阳市| 东安县| 宜春市| 武穴市| 白河县| 太仓市| 开鲁县| 井陉县| 迭部县| 上思县| 淅川县| 枣庄市|