MySQL specific features

 

SQL4X Manager J recognizes the type of database server you are connecting to and presents special options based on your selection. This page explains the special options available for MySQL database servers.

 

Special support for MySQL features

 

Server and connection status views

The status views for your database server and the current connection are available via the corner menu of the Connection list (Database Navigator).

Display Connection Information

If you need to find out more about your database server release or the release number of your JDBC driver take a look at the Connection Information window. To open it select "Display Connection Information..." from the Connection list's corner menu (Database Navigator).

Display Server Status

SQL4X Manager J includes 3 pre-defined status views to retrieve more information about your database server's current setup, workload and currently connected clients. All status views are available via Database Navigator -> [your MySQL connection] -> corner menu -> Special (see snapshot on the left side).

     
 

Manage Users and Access Privileges

SQL4X Manager J includes a special assistant to manage MySQL users, display the access privileges for users, databases and hosts and change the user access privileges and passwords.

To access the MySQL User & Access Privilege Manager use Database Navigator, select your MySQL connection, open the corner menu (see snapshot on the left side) and select "Manage Users & Access Privileges...".

 

Displaying and modifying user access privileges and password

To display the current access privileges for any user select the user name in the list on the User tab. To modify the password click "Change..." and enter the new password for the selected user. If you don't have the necessary access privileges to change the selected users password a message window will pop up.

To change the access privileges for the selected users select or de-select the privileges and click "Save Changes". If you don't have the necessary access privileges to change the selected users privileges a message window will pop up.

All changes are automatically activated (reloaded into the database server). For more information on the access privileges take a look at the official MySQL documentation available at http://www.mysql.com/.

Adding and removing users

To add a new user click the + sign on the right side of the users list and enter Host, User and Password settings. Host is the address, address range or a wildcard specifying the clients a user is allowed to use to connect to this mysql database server. If you want to allow a user to connect from any client specify % (percent sign). User is the new login name. There is no special field within MySQL's user database to specify additional information for a user (ie. company, division, etc).

To remove a user select the user name in the list and click the - sign on the right side of the user list.

Limiting user access to specific databases

After creating a new user this user is allowed to access all logical database hosted on your database server with the specified access privileges. If you want to limit the access of an user to specific databases select the Database tab and add an entry with the Host, Database and User information. If you want to specify default access privileges for all databases or for all users you can use % (percent sign) as wildcard character.

Limiting access from specific clients

If you want to limit the access to your databases from specific clients (ie. systems located in a public area) select the Host tab and add a new entry by specifying the Host and Database information. If you want to specify default access privileges use % (percent sign) as wildcard.

     
 

Database and Table Status views

The status views for your databases and tables are available via the corner menu of the Catalog list (Database Navigator).

Display Table Status

The Table Status view displays detailed information about your tables and statistics about the content, like the size of your datafile for this table (Data_Length) or the average row length (Avg_row_length).

Display Open Tables

Use this view to see which tables have actually been opened by the MySQL database server and are right now accessed by users or have been accessed and are not closed again yet.

     
 

Check, Repair, Analyze and Optimize Tables

MySQL supports several different file types to store your database tables. The default type (MyISAM) needs the be reorganized and checked on a regular basis (especially after many delete operations). These actions for your tables are available via the corner menu of the Content list (Database Navigator). You have to select a table before you can run any of these operations.

Check / Repair Tables

Use "Check Table for Errors" to check the datafile and index files for this table. If any error is found you can usually fix the problem with "Repair Corrupted Table". Most problems can be solved through rebuilding index and datafiles with the repair command, however severe damage of your hard disk or a severe system crash cannot be repaired by the repair command in all situations. In this case you have to restore your database tables from your backup.

Analyze Tables

Analyze table checks the key distribution for the selected table. During the operation the table is locked (read only mode).

Optimize Tables

Optimize tables reorganizes the table and indexes (ie. after you have deleted several records from your table or after many updates to varchar fields) and updates the table statistics.