GoLand 2023.2 Help

Cannot connect to MySQL 5.1

  1. To connect to the database, create a data source that will store your connection details. You can do this using one of the following ways:

    • From the main menu, navigate to File | New | Data Source and select MySQL.

    • In the Database tool window ( View | Tool Windows | Database) , click the New icon (the New icon) in the toolbar. Navigate to Data Source and select MySQL.

    Create a new data source
  2. Click the Driver link and select MySQL for 5.1.

  3. To download JDBC drivers for MySQL 5.1, click the Download link at the bottom of the dialog.

  4. Specify the database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set Empty.

    General tab of the Data Sources and Drivers dialog

    For the reference information about connection settings (for example, Host, Port, and so on) on the General and other tabs of Data Sources and Drivers dialog (Command I), see Data source settings.

  5. Ensure that the connection to the database can be established using the provided details. To do that, click the Test Connection link at the bottom of the connection details area.

    Test Connection link

    In case of any connection issues, refer to the Cannot connect to a database page.

  6. (Optional) By default, only the default schema is introspected and available to work with. If you also want to work with other schemas, in the Schemas tab, select them for the introspection.

    Schemas tab of the Data Sources and Drivers dialog
  7. Click OK to create the data source.

  8. Find your new data source in the Database tool window (Alt+1) .

    • To learn more about the Database tool window, see the corresponding reference topic.

    • To learn how to work with database objects in GoLand, see Database objects.

    • To write and run queries, open the default query console by clicking the data source and pressing F4.

    • To view and edit data of a database object, open Data Editor and Viewer by double-clicking the object.

Connect to MySQL 5.1

Cannot connect to MySQL 5.* in the cloud with SSL

  1. Open data source properties. You can open data source properties by using one of the following options:

    • In the Database tool window ( View | Tool Windows | Database) , click the Data Source Properties icon The Data Source Properties icon.

    • Press Control+Alt+Shift+S.

  2. Click the Driver link and select Go to Driver.

  3. In the Driver Files pane, click the ver. *.*.*.* link and select 5.1.40.

  4. Click the created MySQL data source entry.

  5. Specify the database connection details. Alternatively, paste the JDBC URL in the URL field.

    To delete a password, right-click the Password field and select Set Empty.

    General tab of the Data Sources and Drivers dialog

    For the reference information about connection settings (for example, Host, Port, and so on) on the General and other tabs of Data Sources and Drivers dialog (Command I), see Data source settings.

  6. Ensure that the connection to the database can be established using the provided details. To do that, click the Test Connection link at the bottom of the connection details area.

    Test Connection link

    In case of any connection issues, refer to the Cannot connect to a database page.

  7. (Optional) By default, only the default schema is introspected and available to work with. If you also want to work with other schemas, in the Schemas tab, select them for the introspection.

    Schemas tab of the Data Sources and Drivers dialog
  8. Click OK to create the data source.

  9. Find your new data source in the Database tool window (Alt+1) .

    • To learn more about the Database tool window, see the corresponding reference topic.

    • To learn how to work with database objects in GoLand, see Database objects.

    • To write and run queries, open the default query console by clicking the data source and pressing F4.

    • To view and edit data of a database object, open Data Editor and Viewer by double-clicking the object.

Last modified: 07 July 2023