日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 5.6.34 二进制下载_linux下安装mysql二进制版本(5.6.34)

發(fā)布時間:2023/12/1 数据库 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 5.6.34 二进制下载_linux下安装mysql二进制版本(5.6.34) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我這里下載的是mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz

1.創(chuàng)建mysql用戶和用戶組

#groupadd mysql

#useradd -g mysql mysql

#passwd mysql

2.下載解壓二進制文件,解壓,進入解壓出來的文件

[root@host01 db]# tar -xvf mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz

[root@host01 db]# mv mysql-5.6.34-linux-glibc2.5-x86_64 mysqlmha

3.在mysqlmha目錄下創(chuàng)建如下文件夾

[mysql@host01 mysqlmha]$ cd /db/mysqlmha

[mysql@host01 mysqlmha]$ mkdir conf ? ? ? ? ? ? ? ? ? ? ? ?##?配置文件目錄

[mysql@host01 mysqlmha]$ mkdir data? ? ? ? ? ? ? ? ? ? ? ? ?##數(shù)據(jù)文件

[mysql@host01 mysqlmha]$ mkdir redolog ? ? ? ? ? ? ? ? ? ?##redo日志文件

[mysql@host01 mysqlmha]$ mkdir ibdata ? ? ? ? ? ? ? ? ? ? ?##ibdata文件

[mysql@host01 mysqlmha]$ mkdir -p mysqllog/relaylog ?##主從環(huán)境relaylog

[mysql@host01 mysqlmha]$ mkdir -p mysqllog/logfile ? ?##錯誤日志文件

[mysql@host01 mysqlmha]$ mkdir -p mysqllog/binlog ? ?##binlog文件

4.創(chuàng)建配置文件

在conf目錄下創(chuàng)建配置文件my.cnf,配置文件內(nèi)容附后.

5.更改文件夾mysqlmha的文件所屬用戶

[root@host01 db]# chown -R mysql:mysql mysqlmha

6.安裝數(shù)據(jù)庫

[root@host01 db]#cd /db/mysqlmha/scripts

[root@host01 db]#./mysql_install_db --user=mysql --basedir=/db/mysqlmha --datadir=/db/mysqlmha/data

執(zhí)行該步驟的時候有可能遇到如下錯誤:

錯誤1:

FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db:

Data::Dumper

解決方法:安裝autoconf庫

命令:yum -y install autoconf

錯誤2:

-bash: ./mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory

貌似提示注釋器錯誤,沒有/usr/bin/perl文件或者檔案,解決辦法(安裝perl跟perl-devel即可):

執(zhí)行:yum -y install perl perl-devel

錯誤3:

[root@localhost scripts]# ./mysql_install_db --user=mysql --basedir=/opt/mysql5640 --datadir=/opt/mysql5640/data

Installing MySQL system tables.../opt/mysql5640/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

解決辦法

[root@example.com data]# yum install -y libaio

7.創(chuàng)建軟連接

[root@host01 db]# mkdir -p /usr/local/mysql/bin

[root@host01 db]# ln -s /db/mysqlmha/bin/mysqld /usr/local/mysql/bin/mysqld

[root@host01 db]# chown -R mysql:mysql?/usr/local/mysql

8.啟動數(shù)據(jù)庫

[root@host01 db]#./mysqld_safe --defaults-file=/db/mysqlmha/conf/my.cnf --user=mysql

9.登陸數(shù)據(jù)庫修改密碼

總結(jié)

以上是生活随笔為你收集整理的mysql 5.6.34 二进制下载_linux下安装mysql二进制版本(5.6.34)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。