Book HomeMySQL and mSQLSearch this book

4.5. MySQL Utilities

TcX distributes MySQL with a very rich cast of support utilities. Even with all it has provided, the set of third party tools available is even richer. In this section, we attempt to give a brief overview of these tools with a full description in Chapter 18, "PHP and Lite Reference".

4.5.1. Command Line Tools

isamchk

Performs checks on the underlying data files within the database. These files are called ISAM (Indexed Sequential Access Method) files. This utility can repair almost any kind of damage to an ISAM file. We discuss this in more detail later in the chapter.

isamlog

Reads logs generated by the MySQL server that relate to ISAM files. You can use a complete set of these logs to rebuild a table or to replay table changes after a certain period of time.

mysql

Creates a direct connection to the database server and lets you enter queries directly from a MySQL prompt. You will likely find that you use this more than any other tool.

mysqlaccess

Modifies the MySQL access rights tables and displays them in an easy to read form. Using this utility is a good way for you to learn about the structure of the MySQL access tables.

mysqladmin

Performs administrative functions. This utility can add or delete entire databases as well as shutdown the server itself.

mysqlbug

Reports a problem with MySQL to TcX. The output of this program will also be sent to the MySQL mailing list where the legion of MySQL volunteers will examine the problem.

mysqldump

Sends the complete contents of a table, including the table structure itself, to a file in the form of SQL statements that can recreate the table. You can use the output of this utility to recreate the table in another database or on another server.

mysqlimport

Reads a file of data and inserts it into a database table. This is a delimited file where the delimiters can be any of the common forms, like comma-delimited or quoted.

mysqlshow

Displays the structure of the databases on the server and the tables that make up those databases.

4.5.2. Third Party Tools

No vendor or developer can support everything a product might need all on their own. Open source products such as Linux have been so wildly successful due not only to the work of Linus Torvalds on the Linux kernel, but also to the hundreds, if not thousands, of third party products available for Linux. MySQL, too, has benefited from the work of third party developers. While we would like to list every third party product available, that list changes daily. Here we have tried to put together a representation of what is available. For a current list, visit the MySQL home page at http://www.mysql.com/Contrib.

4.5.2.1. Database conversion utilities

access_to_mysql

Converts Microsoft Access databases to MySQL tables. You insert this into Access as a function that enables you to save your table format in a manner that is exportable to MySQL.

dbf2mysql

Translates dBASE (DBF) files into MySQL tables. Even though dBASE is no longer as popular, the DBF format has become ingrained as the most common cross-application database file format. Every major desktop database can read and write DBF files. This application is thus useful when exporting data to or importing data from commercial desktop databases.

Exportsql/Importsql

Converts Microsoft Access databases to MySQL and vice versa. These tools are Access functions that can be used to export Access tables in a format readable by MySQL. They can also convert SQL output from MySQL and mSQL into a form readable by Access.

4.5.2.2. CGI interfaces

PHP

Creates HTML pages using special tags recognized by the PHP parser. PHP includes interfaces into most major databases, including MySQL and mSQL. We cover PHP in greater detail in Chapter 12, "PHP and Other Support for Database-driven HTML".

Mysql-webadmin

Performs web administration of MySQL databases. This tool enables users to view tables and modify their content using HTML forms.

Mysqladm

Performs web administration of MySQL databases. This CGI program displays tables over the web and supports the addition and modification of tables.

www-sql

Creates HTML pages from MySQL database tables. This program parses HTML files for special tags and uses that information to perform SQL statements against MySQL.

4.5.2.3. Client applications

Mysqlwinadmn

Provides the ability to perform MySQL administration from Windows. This tool enables you to perform the functions of mysqladmin from inside a GUI.

xmysql

Provides full access to MySQL database tables for an X Window System client. This tool supports bulk inserts and deletes.

xmysqladmin

Provides the ability to perform MySQL administration from the X Window System. This tool is a graphical user interface that enables you to create and drop databases and manage tables. You can also use this tool to make sure the server is running, reload access tables, and manage threads.

4.5.2.4. Programming interfaces

MyODBC

Implements the database-independent ODBC (Open Database Connectivity) API for MySQL on Windows.

Db.py

Provides MySQL access to Python scripts. This module supports the caching of retrieved data for better performance. We discuss Python programming against MySQL in Chapter 11, "Python", and provide a detailed reference in Chapter 20, "Python Reference".

Vdb-dflts

Provides a MySQL implementation of the Vdb database library. Vdb is a database-independent C API that enables common client code to access several different backend database servers. Vdb clients can use this API to access MySQL databases.

Delphi-interface

Exposes the MySQL API to Inprise's Delphi. Using this API, any Delphi application can access a MySQL database.

dump2h

Converts MySQL table structures into C header files. This program takes the normal output of mysqldump and generates a C header file that describes the table as a C struct.

mm.mysql.jdbc

Implements the Java standard JDBC (Java Database Connectivity) API. Chapter 14, "Java and JDBC", discusses Java programming against this API in detail, while Chapter 22, "JDBC Reference", provides a full reference for JDBC 2.0.

twzJdbcForMysql

Implements the Java JDBC API.

Mysqltcl

Provides a Tcl interface to MySQL.

MySQLmodule

Provides Python access into MySQL.

Mysql-c++

Wraps the MySQL C API in an object-oriented manner for access from C++ applications.

MySQL++

Provides object-oriented access to MySQL for C++ applications.

Pike-mysql

Enables users of the Roxen web server to write web applications that access MySQL.

Sqlscreens

Generates databases screens in Tcl/Tk from a MySQL database. This tool enables developers to build a custom GUI tied to MySQL tables.

Squile

Enables scripts written in Guile to access MySQL tables.

Wintcl

Supports the embedding of Tcl code in HTML files. Using this tool, you can easily build web applications that can access MySQL databases.

4.5.2.5. Miscellaneous

Emacs-sql-mode

Adapts the standard SQL mode for Emacs to support the nuances of MySQL's syntax. This mode provides indenting, syntax highlighting, and statement completion so that writing SQL is easier.

findres

Finds reserved words in MySQL tables. This program examines MySQL tables for instances of reserved SQL words that may upset other SQL database engines.

Hyalog

Stores outgoing faxes in a MySQL table. This program will watch for faxes sent from the HylaFax program and save a copy into a MySQL table.

mod_auth_mysql

Authenticates users of the Apache web server. Apache normally controls access through plain text files with user names and encrypted passwords. This Apache module enables you to manage access control inside a MySQL database.

mod_log_mysql

Logs web traffic from an Apache web server into a MySQL database.

mysqlpasswd

Supports the addition, deletion, or modification of user records stored in MySQL by the mod_auth_mysql Apache module.

Mysql_watchdog

Monitors MySQL to make sure that it is continuously operational and functioning within normal parameters.

Nsapi_auth_mysql

Authenticates users of the Netscape web server.

Pam_mysql

Provides a PAM (Pluggable Authentication Module) interface for MySQL. PAM provides user verification for a variety of services, including standard system login.

Wuftpd-mysql

Enables logging of FTP traffic with the popular WuFTP daemon to a MySQL database.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.