宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見問題
產(chǎn)品動態(tài)
精選推薦

小內(nèi)存服務(wù)器裝不了MySQL 8?試試這個CentOS編譯安裝大法!

管理 管理 編輯 刪除

上期我們分享了CRMEB多商戶系統(tǒng)(Java)升級MySQL 8的完整攻略,其中提到一個常見問題——如果你的服務(wù)器內(nèi)存只有4G,或安裝了寶塔這類面板,可能直接安裝MySQL 8會失敗。

當時我們建議:可以通過命令行手動編譯安裝,再外鏈到面板進行管理。

是不是聽起來有點麻煩?別急,今天就是來助攻的!

這篇文章手把手帶你在CentOS服務(wù)器上編譯安裝MySQL 8,專治各種環(huán)境不符、內(nèi)存不足、安裝失敗。如果你也卡在這個環(huán)節(jié),趕緊往下看吧!

7e212202510141747184646.png


1、下載MySQL 8安裝包

官方地址https://dev.mysql.com/downloads/mysql/

e5985202510141748208060.png


2、上傳、解壓MySQL

將下載好的MySQL包上傳到/usr/local/目錄下,根據(jù)包的后綴選擇解壓語句。

tar -zxvf mysql-8.0.43-linux-glibc2.28-x86\_64.tar.gz

或者

tar -xvf mysql-8.0.43-linux-glibc2.28-x86\_64.tar.xz


目錄改名:

mv  mysql-8.0.43-linux-glibc2.28-x86\_64 mysql-8.0.43
#創(chuàng)建data文件夾 存儲文件

cd mysql-8.0.34
mkdir data

3、創(chuàng)建用戶組以及密碼

groupadd mysql

useradd -g mysql mysql

#授權(quán)用戶

chown -R mysql.mysql /usr/local/mysql-8.0.34

4、切換到bin目錄下,安裝MySQL

cd bin

./mysqld --user=mysql --lower\_case\_table\_names=1 --basedir=/usr/local/mysql-8.0.34 --datadir=/usr/local/mysql-8.0.34/data/ --initialize

34f73202510141748389340.png

Tips:??得到臨時密碼,這里的密碼記得保存??


5、編輯my.cnf文件

vi /etc/my.cnf

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

[mysqld]

basedir=/usr/local/mysql-8.0/

datadir=/usr/local/mysql-8.0/data/

socket=/tmp/mysql.sock

character-set-server=UTF8MB4

symbolic-links=0

lower\_case\_table\_names=1

6、添加mysqld服務(wù)到系統(tǒng)

cd /usr/local/mysql-8.0.34

cp -a ./support-files/mysql.server /etc/init.d/mysql
#授權(quán)以及添加服務(wù)

 

chmod +x /etc/init.d/mysql

chkconfig --add mysql


7、啟動MySQL

systemctl start mysql

#查看啟動狀態(tài)

systemctl status mysql

#將mysql命令添加到服務(wù)
ln -s /usr/local/mysql-8.0/bin/mysql /usr/bin


8、登錄MySQL

mysql -uroot -p 密碼使用之前隨機生成的密碼

mysql -uroot -p

操作記錄

mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 8.0.34

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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>


9、修改root密碼

這里有兩種方式可以實現(xiàn):

第一種:

[root\@mysql-server \~]# mysql -uroot -p'woHtkMgau9,w'   #登錄

mysql: \[Warning] Using a password on the command line interface can be insecure.

    Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.7.27

....

mysql> alter user 'root'@'localhost' identified by 'Yang\@123';

Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;     //刷新權(quán)限表

Query OK, 0 rows affected (0.00 sec)

mysql> exit

Bye

\[root\@mysql-server \~]# mysql -uroot -p'Yang\@123'

mysql: \[Warning] Using a password on the command line interface can be insecure.

    Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.7.27 MySQL Community Server (GPL)

...

mysql> exit

Bye


第二種:

mysqladmin -u root -p'舊密碼' password '新密碼'

注意:修改密碼必須包含大小寫字母、數(shù)字和特殊符號元素,長度不能小于8位。


10、修改遠程鏈接并生效

#進入到mysql


use mysql;

update user set host='%' where user='root';

flush privileges;


CRMEB產(chǎn)品圈定期更新分享

????歡迎關(guān)注【CRMEB產(chǎn)品圈】????

40b38202503121108146230.jpg



請登錄后查看

CRMEB-官方發(fā)布 最后編輯于2025-10-14 17:53:00

快捷回復(fù)
回復(fù)
回復(fù)
回復(fù)({{post_count}}) {{!is_user ? '我的回復(fù)' :'全部回復(fù)'}}
排序 默認正序 回復(fù)倒序 點贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level || item.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無簡介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復(fù) {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)
查看更多
打賞
已打賞¥{{reward_price}}
91
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見問題 產(chǎn)品動態(tài) 精選推薦 首頁頭條 首頁動態(tài) 首頁推薦
取 消 確 定
回復(fù)
回復(fù)
問題:
問題自動獲取的帖子內(nèi)容,不準確時需要手動修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請輸入 0.1-{{reward_max_price}} 范圍內(nèi)的數(shù)值
打賞成功
¥{{price}}
完成 確認打賞

微信登錄/注冊

切換手機號登錄

{{ bind_phone ? '綁定手機' : '手機登錄'}}

{{codeText}}
切換微信登錄/注冊
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服