共計 1818 個字符,預計需要花費 5 分鐘才能閱讀完成。
這期內容當中丸趣 TV 小編將會給大家帶來有關什么是 MySQL Utilities,文章內容豐富且以專業的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
MySQL Utilities 介紹
MySQL Utilities 提供一組命令行工具用于維護和管理 MySQL 服務器,包括:
管理工具 (克隆、復制、比較、差異、導出、導入)
復制工具 (安裝、配置)
一般工具 (磁盤使用情況、冗余索引、搜索元數據)
MySQL Utilities 是一系列的命令行工具以及 Python 庫更容易完成管理的任務。庫是用 Python 語言寫的,這就意味著不需要安裝其他任何工具和庫。當前是基于 Python2.6 版本設計的,不支持 Python3.1 版本。
MySQL Utilities 提供了各種平臺的軟件包,如果沒有找到對應自己平臺的包,可以通過源碼進行編譯安裝。
最新的 MySQL Utilities 可以在此處下載:http://dev.mysql.com/downloads/utilities/
更多 MySQL Utilities 使用介紹:http://www.ttlsa.com/mysql/mysql-manager-tools-mysql-utilities-tutorial/
http://blog.csdn.net/xlgen157387/article/details/52452394
MySQL Utilities 依賴環境
MySQL Utilities 需要
1. Python2.6 版本,所有的代碼都是基于該版本編寫的。
不同版本 python 下載地址:https://www.python.org/ftp/python/
2. 還需要連接驅動 MySQL Connector/Python 通用版本(高于 1.0.8)
下載地址:http://dev.mysql.com/downloads/connector/python/
python 安裝
1. 通過 wget 下載 Python 安裝包
# wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz
2. 解壓該文件
# tar -zxvf Python-2.6.6.tgz
# ls
Python-2.6.6 Python-2.6.6.tgz
3. 配置安裝路徑
# ./configure –prefix=/usr/local/Python-2.6.6
4. 編譯和安裝
# make
# make install
5. 配置軟鏈接
# ln -s /usr/local/Python-2.6.6/bin/python /bin/python
# python
Python 2.6.6 (r266:84292, Mar 23 2017, 17:55:01)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type help , copyright , credits or license for more information.
MySQL Utilities 源碼安裝
# wget -c https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-utilities-1.6.5.zip
# unzip mysql-utilities-1.6.5.zip
# cd mysql-utilities-1.6.5.zip
# python ./setup.py build
# python ./setup.py install
可以會要求先安裝驅動程序 Connector/Python
命令測試:
# mysqldiskusage
WARNING: Using a password on the command line interface can be insecure.
# Source on localhost: …
Usage: mysqldiskusage –server=user:pass@host:port:socket db1 –all
mysqldiskusage: error: Can t connect to MySQL server on localhost:3306 (111 Connection refused)
#
上述就是丸趣 TV 小編為大家分享的什么是 MySQL Utilities 了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關知識,歡迎關注丸趣 TV 行業資訊頻道。