Properties->Advanced System Settings->Environment Variables"; then find the path; then add the bin directory under the mysql address on the computer; finally open cmd and enter sql Just use the command to view the file."/> Properties->Advanced System Settings->Environment Variables"; then find the path; then add the bin directory under the mysql address on the computer; finally open cmd and enter sql Just use the command to view the file.">

Home  >  Article  >  Database  >  How to open a file in mysql

How to open a file in mysql

藏色散人
藏色散人Original
2020-11-13 09:17:444332browse

How to open a file in mysql: first open "My Computer->Properties->Advanced System Settings->Environment Variables"; then find the path; then add it to the mysql address on the computer bin directory; finally open cmd and enter the sql command to view the file.

How to open a file in mysql

Recommendation: "mysql video tutorial"

Open the file with the mysql command line

First of all, you need to configure system variables. Go to My Computer->Properties->Advanced System Settings->Environment Variables-> to find the path and add it to the bin directory under the mysql address on your computer, such as c :/wampp/mysql/bin

:打开cmd输入以下命令(不需要转换目录)
>
mysql
-u
root
-p
enter
password:
进入mysql后
mysql>use
test;
mysql>
source
c:/test.sql

ok execution completed

You can use show

tables; to see which tables are written (remember there is a semicolon after the statement). You can use desc

tablename; to view your table structure

The above is the detailed content of How to open a file in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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