Lao Xu, sharing the test project can actually solve the problem of dry!
Share today:
How to import MySQL script file data via mysql command line?
-----
Solve the actual problem:
In the process of working , you often need to import MySQL script files
Many students may say, directly through the MySQL client import, easy to fix;
However, many servers, for security reasons, do not open third-party client login privileges (of course there are many other ways to deal with it today, not explored);
At this time, how to import the script?
-----
Premise:
You can already operate MySQL
Know what MySQL is?
Will basic MySQL command
You know what mysql-u root-p123456 mean?
-----
Body Start:
The first step: Import the SQL script file into the current directory, assuming the file is: Idomysqltest.sql
Step two: Determine which database to import to, assuming: Szmzcz
Step three: Start importing
MySQL server input command:mysql–uroot–p123456-dszmzcz<idomysqltest.sql
----
Over, easy to handle!
Of course, there are other ways to import, interested in their own attempts, or Baidu search under;
There are many ways to achieve any one thing;
Be good at thinking!
This article is from the "Ido test nest, Test career Exploration" blog, please be sure to keep this source http://idotest.blog.51cto.com/8206668/1745619
Test Prerequisite Skills Series 1: Script data import via MySQL command