Skip to content
Docs
Connection to a database
Data Source
MySQL

Connect to MySQL

To start using the server object, you should create and open a connection. If the server is empty, you need to create a new database.

Use Chat2DB to quickly connect to the Mysql server.

Official Documentation and Software:

Step 1: Create a new connection

In the toolbar, click the New icon (+), navigate to Data Source and select MySQL.

'newConnection-connection'

Step 2: Fill in the connection information

'newConnection-connection'

  • Name: Customize the connection name for easy memorization
  • Env: Select the connection environment, test, production, etc. to distinguish connections in different environments
  • Storge: Select the connection storage type, currently supports local (LOCAL) and cloud (CLOUD)
  • Host: Mysql server address, which can be IP or domain name
  • Port: Mysql server port, default 3306
  • Authentication: Mysql authentication method, username and password or no authentication required
  • User: Mysql username
  • Password: Mysql password
  • Database: Mysql database name, optional, if not filled in, it will connect to the default database
  • URL: Mysql connection URL, optional, if not filled in, it will be automatically generated according to the above information
  • Driver: Mysql Driver, optional, if not filled, it will be automatically identified according to the URL, or you can select it manually, and the driver configuration items will be displayed after manual selection
  • SSH: Whether to use SSH connection, optional, if not filled, it will not be used by default, and the SSH configuration items will be displayed after selection
  • Advanced Configuration: Advanced configuration, optional, if not filled, it will not be used by default, and the advanced configuration items will be displayed after selection

Step 3: Download driver

If you want to download the JDBC driver for MySQL, click the Download Driver download button at the bottom of the dialog box. Of course, you can also manually upload your own driver (Upload driver)

'driver'

Step 4: Configure SSH channel (optional)

'ssh'

  • USE SSH: Whether to use SSH channel
  • SSH Host: SSH server address
  • SSH Port: SSH server port, default 22
  • Authentication: SSH Authentication method, username and password or private key
  • User: SSH username
  • Password: SSH password
  • Test the SSH connection: Test whether the SSH connection is normal

Step 5: Test the connection

Make sure that you can establish a connection to the database using the details provided. To do this, click the test button in the lower left corner to test whether the connection is normal. If the connection is normal, it will show that the connection is successful. Otherwise, it will show that the connection failed. You can adjust the connection information according to the error message.

'ssh'

If there are any connection problems, please refer to the Cannot connect to database (opens in a new tab) page.

Step 6: Save the connection

After the test connection is passed, click the Save button to save the connection information. The connection information will be displayed in the database list on the left. Click the connection information to view the connection details or delete the connection.

'ssh'