Chapter 7. Connection Dialog

Table of Contents

7.1. Advanced Options
7.2. Configure-service Mode

Once MySQL Administrator has been started, it displays a connection dialog box. Specify the MySQL server you would like to connect to, the necessary credentials, and both the host and port. You may also specify a number of additional options, if required.

For example, to connect to a newly installed server running on the same machine ad the administrative (root) user you would the host localhost, the user root and the password that you sent during installation (or blank if you haven't set one).

Note

As an alternative to connecting to a running MySQL server, you can run MySQL Administrator in Configure-service mode. For information on this topic see Section 7.2, “Configure-service Mode”.

Figure 7.1. Connection Dialog

Connection dialog

Note that MySQL Administrator will not work with MySQL servers prior to version 4.0. If you try to connect to an older server, an error message will be displayed.

If the server connection is successfully established, the values in the fields of the connection dialog will be saved for future connections. For more information on this topic see Appendix C, How Connections Are Stored. However, for security reasons the password is not stored along with the other options unless you explicitly specify otherwise. For instructions on storing the password see Section 23.2, “General Options”.

You can change any of the values in the connection profiles by overwriting the existing values with new ones. Similarly, if you select another connection profile, you can change any of its values. If a successful connection to the MySQL server is established, clicking the OK button after changing a profile's values, permanently saves the changes. However, the preferred method for changing a profile is to click the ... button next to the Connection drop-down box. That brings up an Options dialog window that has a Connections section for modifying connection profiles. You can find the values you can set in the Connection dialog window in the description of the Connections section of the Options dialog (see Section 23.3, “Connections”).

The nature of the connection to the MySQL server varies depending upon the value specified in the Server Host: text box.

Under Linux and Mac OS X the connection to the MySQL server will be a socket connection if “localhost” is used in the Server Host: text box. Specifying 127.0.0.1, the actual IP address that hosts the MySQL server, or the host name results in a TCP connection.

Under Windows, the connection is always a TCP connection unless you connect using named pipes. This is discussed in the following section.

7.1. Advanced Options

To set advanced connection options, click the Details button and check the desired options:

  • Use compression protocol - Use compression when communicating with the MySQL server.

  • Use ANSI quotes to quote identifiers - enclose all object names in double-quotes instead of back-ticks.

  • Windows Only: Use named pipe (localhost only) is equivalent to starting the client from the command line specifying the --protocol=pipe option.

  • Unix Only: Connect using a socket file is equivalent to starting the client from the command line specifying the --protocol=socket option.

If you have difficulties connecting, please see the Troubleshooting Connection Errors section in the Troubleshooting Application Errors appendix.

7.2. Configure-service Mode

Normally, you will use MySQL Administrator to connect to a running MySQL server. This is done by starting the program and specifying in the Connection dialog which server to connect to.

Alternatively, you can run MySQL Administrator in configure-service mode. This is useful in the following cases:

  • When you want to start a MySQL server from within MySQL Administrator. Obviously, you cannot connect to a server that is not running, so you will have to use the configure-service mode to start that server. Note that you can only start servers on the same machine where MySQL Administrator is running (that is on the local host).

  • When you have multiple servers running on your machine. When running in normal mode on Windows, MySQL Administrator only allows you to configure the Windows service that is listed first in the Microsoft Management Console window. This means that if you have more than one Windows service, you can only configure the first one of those, no matter which server you connect to. If you want to configure a service other than the first service, you will have to run MySQL Administrator in configure-service mode. For more information on this topic see Running Multiple MySQL Servers on the Same Machine.

    Note

    The preceding applies only to MySQL Administrator when running on Windows.

To start MySQL Administrator in configure-service mode, hold down the CTRL key in the Connection dialog. The Cancel button will toggle to Skip when the CTRL key is pressed.

Figure 7.2. Switching to Configure-Service Mode

Switching to configure-service mode

Clicking on the Skip button will skip normal mode and start MySQL Administrator in configure-service mode. You should see something similar to the following.

Figure 7.3. Configure-Service Mode

Configure-service mode

Under Installed Services in the sidebar, you can select the service that you wish to configure, or the server that you want to stop or start. Only servers that have been installed using the Windows installer will appear here.

Note

Installed Services is only displayed under Windows.

In configure-service mode, only the following sidebar options are available:

  • The Service Control section allows you to start and stop a MySQL server, and to configure the Windows service managing that server. Servers are stopped using the mysqladmin utility. This program is part of the default MySQL installation but if you have removed it you will not be able to stop a server.

  • The Startup Variables section allows you to set variables for server startup.

  • The Server Logs section allows you to examine the server logs. Note: You do not need to connect in configure-service mode to examine the server logs. This option is available when you connect to a specific server instance.