Use the doscommand to import an SQL file to mysql.

Source: Internet
Author: User

Use the doscommand to import an SQL file to mysql.

To sum up the method of using the doscommand to operate the mysql database. I did not pay attention to it before. It is found that this method is fast. Especially when there is no image management tool for mysql on the server.

(1) first, you must ensure that you can access the database using the command line, that is, configure the path in the environment variable. Write the bin path of the mysql folder to path;

(2) then

Mysql-uroot-proot
Note that you cannot add points later !!!;

Enter the mysql database in this way;

(3) enter the database to be modified, such as the shop to be modified,

Use shop;


Use probably means you can use the database.

(4) In the use environment, you can import the SQL file to the database named shop. Run the following command:

Source d:/shop. SQL;
Source, as its name implies, is the import resource, followed by the resource path. It is best not to have a Chinese path.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.