SOURCE

This topic describes two commands that can be run to import data to PolarDB-X databases.

Run the mysql command to import data to a database

The following code block provides the syntax of the mysql command that can be run to import data to a database:

mysql -u username    -p password    <  Data (runoob.sql) that you want to import from the source database

Examples:

# mysql -uroot -p123456 < runoob.sql

Run the source command to import data to a database

Before you run the source command, log on to the client of the destination database. Then, run the following commands:

create database abc;      # Create a database.
use abc;                  # Use the created database. 
set names utf8;           # Configure the encoding scheme of the data that you want to import.
source /home/abc/abc.sql  # Import the data to the database that you created.

results matching ""

    No results matching ""