Introduction to MySQL database environment (2) [figure] _ MySQL

Source: Internet
Author: User
Introduction to MySQL database environment (2) [figure] TIP: before using MySQL, you need to create a database environment to create a data table. First, you need to install the database environment, that is, MySQL. 1. download MySQL official website is http://www.mysql. org/, 2-9:-9 MySQL official website's current stable version is 5.1. We use MySQL 5.1.22 as the database server and go to its official website h

The root directory contains the following frequently used subdirectories.

Bin directory: This directory contains MySQL startup, stop, and other operation command files. we also need to use this command file to start and manage MySQL.

Data Directory: This directory stores MySQL databases. In this directory, each subdirectory corresponds to a database. By default, two databases are included, namely mysql and test. Directly create a directory under the data Directory, that is, a new database is created.

Docs Directory: This directory contains MySQL documents. manual. chm is the English version of MySQL User manual.

Other sub-directories do not require much attention for developers. In addition, the root directory contains five files with the ini extension, indicating the MySQL configuration parameter files of different levels. Such as my-small.ini, my-large.ini. You can manually modify the attribute values in these files or manage them using SQL-Front.

3. start and stop MySQL

After the MySQL installation file is decompressed, the installation process ends, but it cannot be used at this time. To use MySQL, you must start the MySQL service. Use the mysqld command in the D:/mysql/bin directory. the command line syntax is as follows:

Mysqld -- console

Select Start> menu> Run. in the displayed dialog box, enter cmd to enter the Windows command window. Run the "cd" command to enter the D:/mysql/bin directory, and execute the command line above to start the MySQL service. The displayed window is 2-11.

To stop MySQL services, close the window above.

At this point, we should have completed MySQL installation and startup, but the above startup method requires the command line to be executed every time, which is inconvenient for our use. To this end, we create a new batch file mysql-startup.bat in the D:/mysql/bin directory, write a line of the startup command statement "mysqld -- console ", in the future, you only need to double-click the batch file to start the MySQL service.

  

-11 start the MySQL service

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.