MySQL - MySQL Workbench Manual - 5.2 Creating A New MySQL Connection (Tutorial)
MySQL - MySQL Workbench Manual - 5.2 Creating A New MySQL Connection (Tutorial)
html
MySQL Workbench Manual / Connections in MySQL Workbench / Creating A New MySQL Connection (Tutorial)
1. Launch MySQL Workbench to open the home screen. Existing connections are shown when you click the MySQL Connections view from
the sidebar. No connections exist for first-time users.
1 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
2. From the MySQL Workbench home screen shown in the previous figure, click the [+] icon near the MySQL Connections label to open
the Setup New Connection wizard.
3. Define the Connection Name value, such as MyFirstConnection as the next figure shows.
2 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
The default connection values are for a typical local setup, so check them and enter the appropriate values. If you are unsure, click the
Test Connection button to check the connection parameters. Do not press OK .
Next, optionally click Configure Server Management... , which opens up the Configure Local Management wizard:
4. Read the Configure Local Management introduction (shown in the next figure), and press Next to begin defining the new connection
parameters.
3 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
5. The connection will now be tested. You should see that the connection was successful. If not, click Back and check that you have entered
4 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
the information correctly. The following figure shows a database connection that tested successfully.
5 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
Toggle the Show Logs to view additional details about the tested connection, then click Next .
6. Optionally, you may configure a method for remote management if a Remote Host was specified. Setting these options enables MySQL
Workbench to determine the location of configuration files, and the correct start and stop commands to use for the connection.
SSH login based management and Native Windows remote management types are available. The Operating System and MySQL
Installation Type are configured for the SSH login variant.
This step creates a local MySQL connection, so you can skip the Management and OS and SSH Configuration options, which are used
for configuring a remote MySQL connection.
7. On Microsoft Windows, select the appropriate MySQL service for the MySQL connection, as shown in the figure that follows.
6 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
8. The wizard will now check its ability to access the start and stop commands and then check access to the MySQL Server configuration file
as the next figure shows.
7 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
9. You now have a chance to review the configuration settings. The information displayed varies slightly depending on platform, connection
8 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
At the Review Settings prompt, choose I'd like to review the settings again to review the settings as shown in the next figure.
Choosing Continue closes the Configure Server Management dialog.
9 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
Check the Change Parameters if you want to check or edit information about the MySQL configuration file. For this example, select the
check box and click Next to continue.
10 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
10. Review the MySQL configuration file information shown in the next figure. Click Check Path and Check Name to perform the described
checks, or optionally change the configuration file path.
11 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
11. Optionally, enter your own commands for starting, stopping, and checking the MySQL connection. To apply the default values, leave these
optional values blank as the following figure shows.
12 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
Click Finish to close the Configure Server Management dialog, which returns to the original Setup New Connection step.
13 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
12. After reviewing the Setup New Connection information (see the figure that follows), click Test Connection again to make sure it still
functions and then click OK to create the new MySQL connection.
Your new MyFirstConnection MySQL connection is now listed on the home screen.
13. From the home screen, click the new MySQL connection to open the SQL editor for this connection. The SQL editor is the default page.
14 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
Click Server Status from the Navigator area of the sidebar to display the current status of the connected MySQL server instance (see the
figure that follows).
14. Test the other Navigator area options that relate to your new MySQL connection. Check its status, MySQL logs, and measure its
performance statistics from the Dashboard .
Notice the Administration and Schemas tabs in the Navigator area. The Schemas view displays the schemas that are associated with
your new MySQL connection. Alternatively, you can merge the content of the tabs by either clicking merge ( ) or by enabling the Show
Management Tools and Schema Tree in a single tab SQL editor preference.
15 of 16 11/2/2024, 10:40 PM
Firefox https://dev.mysql.com/doc/workbench/en/wb-getting-started-tutorial-create-connection.html
For additional information about MySQL connections, see Chapter 5, Connections in MySQL Workbench.
© 2024 Oracle
16 of 16 11/2/2024, 10:40 PM