Home  >  Article  >  Database  >  How to use Mysql to import SQL files under Linux system

How to use Mysql to import SQL files under Linux system

WBOY
WBOYforward
2023-05-26 20:04:065040browse

Create an empty database mysql>create database abc;

mysql>create database abc;

Import database method one:

1. Select the newly created database

mysql>use abc;

2. Encoding settings for the database

mysql>set names utf8;

3. Import SQL file data from the path

mysql>source /A/B/C.sql;

Import database method two:

mysql -uabc_f -p abc < C.sql

The above is the detailed content of How to use Mysql to import SQL files under Linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete