MYSQL 5 7 31二進位製包安裝

2021-10-16 05:06:34 字數 1790 閱讀 8109

上傳軟體包至tmp目錄:

[root@mysql57 tmp]# pwd

/tmp

[root@mysql57 tmp]# ll mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz

-rw-r–r-- 1 root root 118 jan 16 11:29 mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz

建立軟體存放目錄:解壓軟體:編寫環境變數:建立mysql使用者和組:

[root@mysql57 ~]# groupadd mysql

[root@mysql57 ~]# useradd mysql -g mysql

建立資料目錄:初始化資料庫:

編寫配置檔案:啟動方式如下:

使用mysqld_safe啟動:配置init.d啟動指令碼:啟動mysql:

[root@mysql57 ~]# /etc/init.d/mysqld start

starting mysql. success!

登入mysql:

[root@mysql57 ~]# mysql -u root -p

enter password:

welcome to the mysql monitor. commands end with ; or \g.

your mysql connection id is 3

server version: 5.7.31

oracle is a registered trademark of oracle corporation and/or its

affiliates. other names may be trademarks of their respective

owners.

type 『help;』 or 『\h』 for help. type 『\c』 to clear the current input statement.

mysql> alter user 『root』@『localhost』 identified by 『123456』;

query ok, 0 rows affected (0.00 sec)

mysql> flush privileges;

query ok, 0 rows affected (0.00 sec)

配置使用systemd管理mysql:[root@mysql57 ~]# /etc/init.d/mysqld stop

shutting down mysql… success!

配置開機自啟動:

[root@mysql57 ~]# systemctl enable mysqld

created symlink from /etc/systemd/system/multi-user.target.wants/mysqld.service to /etc/systemd/system/mysqld.service.

mysql二進位制 MySql二進位制連線方式詳解

使用mysql二進位制方式連線 您可以使用mysql二進位制方式進入到mysql命令提示符下來連線mysql資料庫。例項以下是從命令列中連線mysql伺服器的簡單例項 root host mysql u root p enter password 在登入成功後會出現 mysql 命令提示視窗,你可以...

mysql二進位制恢復 mysql二進位制日誌恢復

二進位制日誌匯出 1.按時間節點匯出 no defaults 用來對mysql5.5之前mysqlbinlog命令報錯 mysqlbinlog no defaults start date 2017 08 08 15 04 04 stop date 2017 08 08 15 12 00 progr...

mysql二進位制方式 MySql二進位制連線方式詳解

使用mysql二進位制方式連線 您可以使用mysql二進位制方式進入到mysql命令提示符下來連線mysql資料庫。例項以下是從命令列中連線mysql伺服器的簡單例項 複製 如下 root host mysql u root p enter password 在登入成功後會出現 mysql 命令提示...