探索,發現,愛好、學習,記錄,分享。
學海無涯,天涯若比鄰,三人行,必有我師。

宝塔一键更改默认mysql数据目录路径

该shell脚本仅限于宝塔bt.cn linux面板使用

  
主要参数功能:

1.默认修改数据库存放路径
sh mysql_Transfer.sh
2.还原数据库原存放路径
sh mysql_Transfer.sh old

脚本相关提示英文翻译:

抱歉,找不到/www/server/data目录!
Sorry, I can’t find the /www/server/data directory!
抱歉,找不到/www/server/mysql目录!
Sorry, I can’t find the /www/server/mysql directory!
输入新的数据库路径(例如:/home/mysql):
Enter a new database path (for example, /home/mysql):
新的数据库路径不能为空!
New database path cannot be empty!
数据库目录更改不成功!
Database directory changes not successful!
数据库目录更改成功!
Database directory changed successfully!
正在转移mysql文件,可能需要一分钟!
Moving the MySQL file, you may need a minute!
正在转移数据库文件,可能需要一分钟!
Transferring the database file, you may need a minute!
新mysql安装路径:
Now MySQL installation path:
恢复成功!
Recover successfully!
恢复失败!
Recovery failure!
新数据库文件路径:
New database file path:

===========================================================

下载链接:

wget http://www.tieww.com/soft/mysql_Transfer.sh && sh mysql_Transfer.sh

版權聲明:本文采用知識共享 署名4.0國際許可協議 [BY-NC-SA] 進行授權
轉載事宜:如需轉載需徵得應允,轉載必須注明來源於本站的信息。
文章名称:《宝塔一键更改默认mysql数据目录路径》
文章链接:https://www.thefreesky.com/blog/23744.html
本站資源僅供個人學習交流,請於下載後24小時內刪除,不允許用於商業用途,否則法律問題自行承擔。

評論 抢沙发