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.">
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.
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!