MySQL Learning notes--operations on the database

Source: Internet
Author: User

First, start/Shut down the database service:

1. Open cmd Command Prompt window

2, enter the command net start MySQL , enter, then started the MySQL service

3. After entering the command net stop MySQL , enter, then turn off the MySQL service

Second, the login database

1. Open cmd Command Prompt window

2. Start MySQL service net start MySQL

3. Login Input command mysql-u user name (e.g. root)-P Enter

4, enter the corresponding password, return

Third, create the database

Command:create database name;

Where the database name is a special case, you should include it with the anti-quote ' ' .

Special cases include:

1, Pure Digital

2. Special symbols

3. mysql internal key words

4. Chinese

Iv. viewing the currently existing database

Command: show databases;

V. View the creation statement for the database

Command: show create database name;

Vi. Modifying the database character set

Command:ALTER DATABASE name character set GBK;

Vii. deletion of databases

Command:drop database name;

MySQL Learning notes--operations on the database

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.