Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

Monitoring MySQL Server with the MySQL Control Center 323

Analyze Table: This tool updates the data statistics used by the MySQL optimizer. Run this when you’ve made significant changes to the data in your tables.

Check Table: This tool checks the table for errors. If you get an error message that you don’t understand, run Check Table to look for possible problems.

Repair Table: This tool repairs the table. Choose this tool if Check Table reports any errors.

Optimize Table: This tool reclaims free space and rebuilds indexes to increase performance.

Show Create: This tool displays the Create Table and Create Index statements that created the table.

• Figure 43-8: The tools included with MySQLCC.

After you select the tool that you want to run, a pop-up window opens, displaying the tables in your database (see Figure 43-9).

3. Choose the table you want the tool to act on and then click the Action button (for the Analyze Table tool, it’s labeled Analyze, for the Check Table tool, it’s labeled Check, and so on).

• Figure 43-9: Choose a table from the list.

It’s a good idea to analyze, check, and optimize your MySQL tables on a regular basis to keep them in top form (database performance tends to degrade over time and the analyze and optimize tools can give you a quick speed boost). If the Check Table tool reports any errors, use the Repair Table tool to correct the problem.

Putting the Server Administration controls to work

Follow these steps to begin working with the Server Administration controls:

1. Follow the steps in the section, “Accessing

MySQL Control Center features,” earlier in this technique, to find the Server Administration controls.

2. Double-click the Server Administration entry on the tree control to open the Administration Panel.

The panel has three tab controls. Table 43-1 gives you a quick look at what each tab has to offer.

324 Technique 43: Keeping an Eye on Your Servers

TABLE 43-1: USING THE MYSQL CONTROL CENTER SERVER ADMINISTRATION TOOLS

Tab

What It Does

Timesaving Bonus Info

Process List

Displays a list of the MySQL

 

client sessions

Click the clock icon at the right end of the toolbar to turn the auto-refresh option on and off. With auto-refresh on, the Process List tab displays the ongoing activities on your server (see Figure 43-10). If a process in the Process List is running slow, you can use the MySQL Control Center to kill it off. Check the box in the ID column to the left of the session and choose Action Kill Process.

Status

Displays statistical

The values shown in the Status tab give you a detailed look at how your

 

information about the server

MySQL server is being used. You can see the number of client connections,

 

 

number of queries executed, as well as a count of how many times each

 

 

MySQL command has been executed since your server booted.

Variables

Displays configuration

The Variables tab shows you each MySQL configuration parameter and its

 

information for the server

information for the servercurrent value.

 

 

 

2. Right-click User Administration and choose

New User from the pop-up menu.

The Add User dialog opens, as shown in

Figure 43-11.

• Figure 43-10: Live monitoring of activity on the MySQL server.

Adding a new user

Here’s how to add a new user with the MySQL Control Center:

1. Follow the steps in the section, “Accessing

MySQL Control Center features,” earlier in this technique, to get to the User Administration controls.

Figure 43-11: The Add User dialog.

3.Fill in the dialog and then click the Add button to add your new user.

Соседние файлы в предмете Операционные системы