MySQL 유틸리티 툴킷 개요 및 설치
MySQL 유틸리티는 Python 언어로 작성된 Python 라이브러리를 기반으로 하는 명령줄 유틸리티 도구 세트이며 Python 2.6에 의존합니다. 이 도구는 복제, 복사, 비교, 차이, 내보내기, 가져오기, 설치, 구성, 인덱싱, 디스크 보기 등과 같이 MySQL 데이터베이스 운영 및 유지 관리 프로젝트에서 일반적으로 사용되는 몇 가지 도구를 제공합니다. 이 도구 키트를 사용하면 심각하든 경미하든 관계없이 테스트나 CT 스캔을 수행할 수 있는 기적의 의사가 될 수도 있습니다. MySQL 유틸리티는 다양한 플랫폼에 대한 소프트웨어 패키지를 제공합니다. 귀하의 플랫폼에 해당하는 패키지를 찾지 못한 경우, 소스 코드를 통해 이를 컴파일하고 설치할 수 있습니다. 이 문서에서는 주로 MySQL 유틸리티 설치와 각 작동 기능에 대한 예비 설명을 설명합니다.
1. MySQL 유틸리티 기능 및 구성요소
Binary Log Operations(二进制日志操作) mysqlbinlogmove 二进制日志移动 mysqlbinlogpurge 二进制日志清理 mysqlbinlogrotate 二进制日志老化工具 Database Operations(数据库操作) mysqldbexport 数据导出 mysqldbimport 数据导入 mysqldbcopy 库级别数据库复制 mysqldiff 数据库对象级别比较工具 mysqldbcompare 数据库库级别比较工具 General Operations(通用用的操作) mysqldiskusage 磁盘空间查看 mysqlfrm 恢复故障表.frm文件 mysqluserclone 用户克隆工具 mysqluc Utilities帮助工具 mysqlindexcheck 索引检测工具 mysqlmetagrep 元数据过滤器 mysqlprocgrep 进程搜索及清理工具 High Availability Operations(高可用) mysqlreplicate 主从复制工具 mysqlrpladmin 主从复制管理工具 mysqlrplcheck 主从复制检测工具 mysqlrplms 主从多元复制工具 mysqlrplshow 主从复制拓扑图工具 mysqlrplsync 主从复制同步工具 mysqlfailover 主从failover工具 mysqlslavetrx 从库事务跳过工具 Server Operations(服务器操作) mysqlserverinfo 服务器信息查看工具 mysqlserverclone 服务器克隆工具 Specialized Operations(特殊操作) mysqlauditadmin 审计管理工具 mysqlauditgrep 审计日志过滤工具
2. 설치 요구사항 및 다운로드 주소
需求 Python 2.6 MySQL Connector/Python 连接器 下载地址: http://www.php.cn/
3.
###本次安装使用1.6.4版本,安装前,需要先安装mysql到python连接器# cat /etc/redhat-release CentOS release 6.7 (Final) # rpm -Uvh mysql-connector-python-2.1.4-1.el6.x86_64.rpm # rpm -Uvh mysql-utilities-1.6.4-1.el6.noarch.rpm ###如果没有安装连接器,则收到如下错误提示 # rpm -Uvh mysql-utilities-1.6.4-1.el6.noarch.rpm warning: mysql-utilities-1.6.4-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY error: Failed dependencies: mysql-connector-python >= 2.0.0 is needed by mysql-utilities-1.6.4-1.el6.noarch###查看安装后生成的文件 # rpm -ql mysql-utilities-1.6.4-1.el6|grep "/usr/bin"/usr/bin/mysqlauditadmin /usr/bin/mysqlauditgrep /usr/bin/mysqlbinlogmove /usr/bin/mysqlbinlogpurge /usr/bin/mysqlbinlogrotate /usr/bin/mysqldbcompare /usr/bin/mysqldbcopy /usr/bin/mysqldbexport /usr/bin/mysqldbimport /usr/bin/mysqldiff /usr/bin/mysqldiskusage /usr/bin/mysqlfailover /usr/bin/mysqlfrm /usr/bin/mysqlgrants /usr/bin/mysqlindexcheck /usr/bin/mysqlmetagrep /usr/bin/mysqlprocgrep /usr/bin/mysqlreplicate /usr/bin/mysqlrpladmin /usr/bin/mysqlrplcheck /usr/bin/mysqlrplms /usr/bin/mysqlrplshow /usr/bin/mysqlrplsync /usr/bin/mysqlserverclone /usr/bin/mysqlserverinfo /usr/bin/mysqlslavetrx /usr/bin/mysqluc /usr/bin/mysqluserclone
4. 도움 받기
1. mysqluc를 통해 도움 받기###mysqluc 명령줄 도구###를 호출하면 이러한 도구에 대한 도움말 정보를 얻을 수 있습니다. 명령줄 프롬프트 창,
이 창에서 해당 명령 작업을 완료할 수도 있습니다. [root@node1 ~]#mysqluc콘솔 시작 중...
Welcome to the MySQL Utilities Client (mysqluc) version 1.6.4Copyright (c) 2010, 2016 Oracle and/or its affiliates. All rights reserved. This is a release of dual licensed MySQL Utilities. For the avoidance ofdoubt, this particular copy of the software is released under the version 2 of the GNU General Public License. MySQL Utilities is brought to you by Oracle. Type 'help' for a list of commands or press TAB twice for list of utilities. mysqluc> help Command Description ---------------------- ---------------------------------------------------help utilities Display list of all utilities supported. help <utility> Display help for a specific utility. show errors Display errors captured during the execution of the utilities. clear errors clear captured errors. show last error Display the last error captured during the execution of the utilities help | help commands Show this list. exit | quit Exit the console. set <variable>=<value> Store a variable for recall in commands. show options Display list of options specified by the user on launch. show variables Display list of variables. <ENTER> Press ENTER to execute command. <ESCAPE> Press ESCAPE to clear the command entry. <DOWN> Press DOWN to retrieve the previous command. <UP> Press UP to retrieve the next command in history. <TAB> Press TAB for type completion of utility, option, or variable names. <TAB><TAB> Press TAB twice for list of matching type completion (context sensitive). ###查看utilities包中所有的命令行工具mysqluc> help utilities Utility Description ----------------- --------------------------------------------------------mysqlauditadmin audit log maintenance utility mysqlauditgrep audit log search utility mysqlbinlogmove binary log relocate utility mysqlbinlogpurge purges unnecessary binary log files mysqlbinlogrotate rotates the active binary log file mysqldbcompare compare databases for consistency mysqldbcopy copy databases from one server to another mysqldbexport export metadata and data from databases mysqldbimport import metadata and data from files mysqldiff compare object definitions among objects where the difference is how db1.obj1 differs from db2.obj2 mysqldiskusage show disk usage for databases mysqlfailover automatic replication health monitoring and failover mysqlfrm show CREATE TABLE from .frm files mysqlgrants display grants per object mysqlindexcheck check for duplicate or redundant indexes mysqlmetagrep search metadata mysqlprocgrep search process information mysqlreplicate establish replication with a master mysqlrpladmin administration utility for MySQL replication mysqlrplcheck check replication mysqlrplms establish multi-source replication mysqlrplshow show slaves attached to a master mysqlrplsync replication synchronization checker utility mysqlserverclone start another instance of a running server mysqlserverinfo show server information mysqlslavetrx skip transactions on slaves mysqluserclone clone a MySQL user account to one or more new users ###也可直接在mysqluc提示符下输入 help command 来获取对应命令的帮助信息,如下mysqluc> help mysqlauditadmin Usage: mysqlauditadmin --server=user:pass@host:port --show-options # Author : Leshami # Blog : http://www.php.cn/mysqlauditadmin - audit log maintenance utility Options: Option Description ------------------------- --------------------------------------------------version show program's version number and exit --help display this help message and exit --license display program's license and exit --server=SERVER connection information for the server in the form: <user>[:<password>]@<host>[:<port>][:<socket>] or <login-path>[:<port>][:<socket>] or <config- path>[<[group]>]. --audit-log-name=LOG_NAME full path and file name for the audit log file. Used for stats and copy options. --show-options display the audit log system variables. --remote-login=RLOGIN user name and host to be used for remote login for copying log files. Format: <user>:<host_or_ip> Password will be prompted. --file-stats display the audit log file statistics. --copy-to=COPY_LOCATION the location to copy the audit log file specified. The path must be locally accessible for the current user. --value=VALUE value used to set variables based on the command specified. See --help for list per command. --ssl-ca=SSL_CA path to a file that contains a list of trusted SSL CAs. --ssl-cert=SSL_CERT name of the SSL certificate file to use for establishing a secure connection. --ssl-key=SSL_KEY name of the SSL key file to use for establishing a secure connection. --ssl=SSL specifies if the server connection requires use of SSL. If an encrypted connection cannot be established, the connection attempt fails. By default 0 (SSL not required). -v, --verbose control how much information is displayed. e.g., -v = verbose, -vv = more verbose, -vvv = debug Available Commands: copy - copy the audit log to a locally accessible path policy - set the audit log policy Values = ALL, NONE, LOGINS, QUERIES, DEFAULT rotate - perform audit log rotation rotate_on_size - set the rotate log size limit for auto rotation Values = 0, 4294967295 2、直接在shell提示符下获取命令帮助###如下示例[root@node1 ~] # mysqlfailover --help|headMySQL Utilities mysqlfailover version 1.6.4 License type: GPLv2 Usage: mysqlfailover --master=root@localhost --discover-slaves-login=root --candidates=root@host123:3306,root@host456:3306 mysqlfailover - automatic replication health monitoring and failover Options: --version show program's version number and exit --help display this help message and exit --license display program's license and exit 3、基于Linux man获取命令帮助###如下示例root@node1 ~] # man mysqlfailoverMYSQLFAILOVER(1) MySQL Utilities MYSQLFAILOVER(1) NAME mysqlfailover - Automatic replication master failover SYNOPSIS mysqlfailover [options]

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

웹 응용 프로그램에서 MySQL의 주요 역할은 데이터를 저장하고 관리하는 것입니다. 1. MySQL은 사용자 정보, 제품 카탈로그, 트랜잭션 레코드 및 기타 데이터를 효율적으로 처리합니다. 2. SQL 쿼리를 통해 개발자는 데이터베이스에서 정보를 추출하여 동적 컨텐츠를 생성 할 수 있습니다. 3.mysql은 클라이언트-서버 모델을 기반으로 작동하여 허용 가능한 쿼리 속도를 보장합니다.

Docker에서 MySQL을 시작하는 프로세스는 다음 단계로 구성됩니다. MySQL 이미지를 가져와 컨테이너를 작성하고 시작하고 루트 사용자 암호를 설정하고 포트 확인 연결을 매핑하고 데이터베이스를 작성하고 사용자는 데이터베이스에 모든 권한을 부여합니다.

Laravel은 웹 응용 프로그램을 쉽게 구축하기위한 PHP 프레임 워크입니다. 설치 : Composer를 사용하여 전 세계적으로 Laravel CLI를 설치하고 프로젝트 디렉토리에서 응용 프로그램을 작성하는 등 다양한 기능을 제공합니다. 라우팅 : Routes/Web.php에서 URL과 핸들러 간의 관계를 정의하십시오. 보기 : 리소스/뷰에서보기를 작성하여 응용 프로그램의 인터페이스를 렌더링합니다. 데이터베이스 통합 : MySQL과 같은 데이터베이스와 상자 외 통합을 제공하고 마이그레이션을 사용하여 테이블을 작성하고 수정합니다. 모델 및 컨트롤러 : 모델은 데이터베이스 엔티티를 나타내고 컨트롤러는 HTTP 요청을 처리합니다.

작은 응용 프로그램을 개발할 때 까다로운 문제가 발생했습니다. 가벼운 데이터베이스 운영 라이브러리를 신속하게 통합해야합니다. 여러 라이브러리를 시도한 후에는 기능이 너무 많거나 호환되지 않는다는 것을 알았습니다. 결국, 나는 내 문제를 완벽하게 해결하는 YII2를 기반으로 단순화 된 버전 인 Minii/DB를 발견했습니다.

MySQL 및 Phpmyadmin은 강력한 데이터베이스 관리 도구입니다. 1) MySQL은 데이터베이스 및 테이블을 작성하고 DML 및 SQL 쿼리를 실행하는 데 사용됩니다. 2) PHPMYADMIN은 데이터베이스 관리, 테이블 구조 관리, 데이터 운영 및 사용자 권한 관리에 직관적 인 인터페이스를 제공합니다.

기사 요약 :이 기사는 Laravel 프레임 워크를 쉽게 설치하는 방법에 대한 독자들을 안내하기위한 자세한 단계별 지침을 제공합니다. Laravel은 웹 애플리케이션의 개발 프로세스를 가속화하는 강력한 PHP 프레임 워크입니다. 이 자습서는 시스템 요구 사항에서 데이터베이스 구성 및 라우팅 설정에 이르기까지 설치 프로세스를 다룹니다. 이러한 단계를 수행함으로써 독자들은 라벨 프로젝트를위한 탄탄한 토대를 빠르고 효율적으로 놓을 수 있습니다.

다른 프로그래밍 언어와 비교할 때 MySQL은 주로 데이터를 저장하고 관리하는 데 사용되는 반면 Python, Java 및 C와 같은 다른 언어는 논리적 처리 및 응용 프로그램 개발에 사용됩니다. MySQL은 데이터 관리 요구에 적합한 고성능, 확장 성 및 크로스 플랫폼 지원으로 유명하며 다른 언어는 데이터 분석, 엔터프라이즈 애플리케이션 및 시스템 프로그래밍과 같은 해당 분야에서 이점이 있습니다.

MySQL은 웹 응용 프로그램 및 컨텐츠 관리 시스템에 적합하며 오픈 소스, 고성능 및 사용 편의성에 인기가 있습니다. 1) PostgreSQL과 비교하여 MySQL은 간단한 쿼리 및 높은 동시 읽기 작업에서 더 잘 수행합니다. 2) Oracle과 비교할 때 MySQL은 오픈 소스와 저렴한 비용으로 인해 중소 기업에서 더 인기가 있습니다. 3) Microsoft SQL Server와 비교하여 MySQL은 크로스 플랫폼 응용 프로그램에 더 적합합니다. 4) MongoDB와 달리 MySQL은 구조화 된 데이터 및 트랜잭션 처리에 더 적합합니다.
