This site requires JavaScript to be enabled
Welcome Guest|
Recent searches
IE BUMPER

Connecting With the MySQL Client

Number of views : 19
Article Number : KB0011581
Published on : 2020-07-02
Last modified : 2020-07-02 17:45:55
Knowledge Base : IT Public Self Help

Overview

This page describes a variety of methods of connecting to your MySQL database using a MySQL client, including through a web browser, a graphical user interface (GUI) client, and from the command line.

 

Browser Interface

You can access the ITS MySQL servers (mysqlprod01.austin.utexas.edu, mysqlqual01.austin.utexas.edu, or mysqldev01.austin.utexas.edu) using phpMyAdmin from your browser.

Note: Access to the ITS phpMyAdmin site is restricted to the UT Campus network and the UT VPN.

phpMyAdmin allows you to create, modify, query, and drop tables within your database(s). More information about phpMyAdmin can be found in the phpMyAdmin Documentation.

To connect to the ITS phpMyAdmin site:

  1. Go to ITS phpMyAdmin.
  2. If prompted with a UTLogin screen, enter your UT EID and password.
  3. On the Welcome to phpMyAdmin screen, enter your database or administrative username and the corresponding password.

  4. Select the database environment and instance (port) that your database is in from the Server Choice drop-down menu.
  5. Click the Go button to log in.

 

GUI Client

There are a variety of MySQL GUI clients that can be used to manage your databases. One popular tool is MySQL Workbench, which is available for Windows, Linux, and macOS. If you need assistance installing MySQL Workbench, contact your system administrator.

Note: Access to the ITS MySQL servers is restricted to the UT Campus network and the UT VPN.

To connect using MySQL Workbench:

  1. Create a new connection profile by pressing the “plus” (+) button next to MySQL Connections.
  2. Enter a name for your Connection Name as well as the Hostname, Port, and Username used to connect to your database. You can also optionally store the database password with the connection profile.

  3. If your connection requires SSL, click the SSL tab. Select Require for the Use SSL field and provide the path to your MySQL SSL certificate for the SSL CA File field.

  4. Once the information for the profile has been entered, press the Test Connection button to verify the parameters are correct.
  5. Press the OK button to save the profile. You can then click on the profile name to connect to it.

 

Command Line

The MySQL command line is a simple SQL shell that allows you to manage your database(s). More information about the MySQL command line tool can be found in the MySQL Reference Manual.

 

Linux

From a Linux system, you can connect to your MySQL database with the command line built into the MySQL client.

Note: Access to the ITS MySQL servers is restricted to the UT Campus network and the UT VPN.

To connect with the MySQL command line:

  1. Install the MySQL client appropriate for your distribution of Linux. If you need assistance, contact your system administrator.
  2. Connect to your database (you will be prompted for your password):
    • If your connection does not require SSL:
      mysql -u <user> -p -h <host> -P <port>
    • If your connection does require SSL:

      mysql -u <user> -p -h <host> -P <port> --ssl-ca=<ca-cert>

Where the options above are:

  • user: Either the database username or the administrative username for your database
  • host: The database server that your database is on, which is one of mysqlprod01.austin.utexas.edu, mysqlqual01.austin.utexas.edu, or mysqldev01.austin.utexas.edu
  • port: The port number or instance that your database is on, which is one of 3306, 3307, or 3308
  • database: The name of the database that you want to connect to
  • ca-cert: The path to where you saved the MySQL SSL CA certificate (ca-mysqldb02-cert.pem)

 

For ease of use, you can shorten the connection string in two ways:

  1. Use an encrypted login path file created by the mysql config editor tool (preferred).

    • Create a login path entry (you will be prompted for your password):

      mysql_config_editor set -u <user> -p -h <host> -P <port> -G <name>
    • Log in using the login path entry (you will not be prompted for your password since it is now contained within the encrypted login path file):

      mysql --login-path=<name> <database>
  2. Add an alias to your shell profile.

    • For the bash shell, create an alias (other shells may require different syntax):
      alias <name>=“mysql -u <user> -p -h <host> -P <port> <database>”
    • Log in using the alias by typing the name of the alias at the command prompt. You will be prompted for your password.

Windows

From a Windows system, you can connect to your MySQL database with the command line built into MySQL Workbench.

Note: Access to the ITS MySQL servers is restricted to the UT Campus network and the UT VPN.

To connect with the MySQL command line:

  1. Install and configure MySQL Workbench (see the section titled “GUI Client” on this page).
  2. Right-click on your connection profile and select Start Command Line Client.
  3. If prompted, enter the password for the user configured in the connection profile.

 

 

 

Thank You! Your feedback has been submitted.

Feedback