How to use Mysql to import SQL files under Linux system

WBOY
Release: 2023-05-26 20:04:06
forward
5014 people have browsed it

Create an empty database mysql>create database abc;

mysql>create database abc;
Copy after login

Import database method one:

1. Select the newly created database

mysql>use abc;
Copy after login

2. Encoding settings for the database

mysql>set names utf8;
Copy after login

3. Import SQL file data from the path

mysql>source /A/B/C.sql;
Copy after login

Import database method two:

mysql -uabc_f -p abc < C.sql
Copy after login

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!