Home > Database > Mysql Tutorial > body text

mysql executes sql script file

coldplay.xixi
Release: 2020-09-30 10:52:53
Original
20295 people have browsed it

Mysql method to execute sql script file: 1. Enter [mysql -h localhost -u root -p123456

mysql executes sql script file

Mysql method of executing sql script file:

The first method:

In Under the command line (not connected to the database), enter mysql -h localhost -u root -p123456 < F:\hello world\niuzi.sql (note that the path does not need to be quoted!!) and press Enter. .

Second method:

In the command line (the database is connected, the prompt at this time is mysql>), enter source F:\hello world\niuzi.sql (note that the path does not need to be quoted) or \. F:\hello world\niuzi.sql (note that the path does not need to be quoted) and press Enter.

More related free learning recommendations: mysql tutorial(video)

The above is the detailed content of mysql executes sql script file. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template