MySQL executes SQL statements in batches

Source: Internet
Author: User

MySQL executes SQL statements in batches. First, create a bat file, use NotePad to open the bat file, and edit the file as follows: rem MySQL_HOME local MySQL installation path rem HOST mysql Server IP address, which can be local, it can also be the PORT of the remote rem PORT mysql server. The default value is 3306 rem user password, for example, the character set rem DATABASE used by the rootrem DEFAULT-CHARACTER-set database is the data name to be connected to. The qc1 rem test is used here. the script file to be executed by SQL, Which is mysql. sqlrem mysql should be followed by a row. SET MySQL_HOME = D: \ DATABASE \ MySQL SERVER 5.1 set path = % MySQL_HOME % \ BIN; % PATH % mysql -- host = localhost -- port = 3306 -- user = root -- password = sa -- default-CHARACTER-SET = utf8 qc1 <mysql. after sqlpause is saved, double-click the bat file to run it.

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.