Import an SQL file using Navicat for MySQL

更新时间:
复制 MD 格式

This topic describes how to import an SQL file using Navicat for MySQL.

Prerequisites

Ensure that Navicat for MySQL is installed. You can download it from the Navicat website.

Procedure

  1. Start Navicat for MySQL.

  2. In the menu bar, choose Connection > MySQL.

  3. In the MySQL - New Connection dialog box, enter the database information and click OK.

    Note

    Parameter

    Description

    Connection Name

    Enter a custom name for the database connection.

    Host

    Enter the database endpoint.

    Port

    Enter the database port. The default port for MySQL is 3306.

    Username

    Enter the database username.

    Password

    Enter the database password.

  4. In the navigation pane on the left, right-click the connected database and click Open Database.

  5. In the navigation pane on the left, right-click the database and click Run SQL File.

  6. In the Run SQL File dialog box, select the SQL file to import. Select the Continue on error, Run multiple queries in each execution, and SET AUTOCOMMIT=0 check boxes. Then, click Start.

Results

The SQL file is successfully imported, as shown in the following figure.