MySql installation, import, and export

Source: Internet
Author: User

I. Install MySQL
In the MySQL database directory find the run mysql-essential-5.0.67-win32.msi Installation File, click Next select Custom installation method, as shown in:

2: click "Next" until the following installation page is displayed:

3: click the "Finish" button, follow the installation steps, and click the "Next" button until the following window appears. In this window, select to install the Server as the Server Machine, instead of the default Developer Machine, as shown in:

(4) After clicking the Next button, keep following the installation steps and click the Next button until the following window appears. Use the Online Transaction OLAP option as the installation method, as shown in:

(5) After clicking the Next button, keep following the installation steps and click the Next button until the following window appears, "manually select character set options" as the installation method, change the default latin1 to GB2312. Otherwise, MySQL data does not support Chinese characters, as shown in

Modify the config file. As shown in:

(7) after clicking the Next button, keep following the installation steps and click the Next button. The last button to be clicked is the Execute button until the installation is complete.
Ii. import data files
(1) enter the "command prompt" interface and enter the command "mysql-u username-p password" to log on to the database. For example, the user name is root and the password is mtdb, enter "mysql-u root-pmtdb" and press enter to log on. As shown in:

(2) Enter "create database name character set utf8;" to create a database, for example, to create a mtcems database, and enter "create database mtcems character set utf8;", as shown in:

(3) view all databases and enter "show databases;" to view the database you just created, as shown in:

(4) Select the database you just created, for example, select the "mtcems" database and enter "use mtcems;", as shown in:

(5) import the SQL file and enter "source SQL file path". For example, the SQL file directory is "f: \ mtcems. SQL, enter "source f: \ mtcems. SQL, as shown in:

(6) After the import is successful, enter "show tables" to view all created tables, as shown in:

Iii. Export files
(1) enter the "command prompt" interface and enter the command "mysqldump-u username-p Password Database Name> export SQL data file name" to export the data file. For example: export the "mtcems" database to the drive c directory, and enter "mysqldump-u root-pmtdb mtcems> c: \ mtcems. SQL ". As shown in:

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.