Nine common mysql commands

Source: Internet
Author: User
Tags mysql commands mysql command line

To learn about mysql databases, you must first master frequently used mysql commands. The following describes nine frequently used mysql commands, which may help you learn frequently used mysql commands.

1. start the MYSQL service. net start mysql

Stop MYSQL service. net stop mysql

2. netstat-na | findstr 3306: Check the listening port. findstr is used to check whether the following port exists.

3. log on to the MYSQL console using the mysql commend line tool.

Syntax format: mysql-user = root-password = 123456 db_name

Or mysql-uroot-p123456 db_name

4. After Entering the MYSQL command line tool, use status; or \ s to view the running environment information

5. Switch the database connection Syntax: use new_dbname;

6. display all databases: show databases;

7. display all tables in the database: show tables;

8. show all information about a table: show create table table_name;

9. view the specific attribute information of the table and the description of each field in the table.
Describe table_name; Abbreviation: desc table_name;

The preceding section describes common mysql commands.

Common MySQL auto-increment Fields

Mysql character encoding method

Statement for modifying fields in mysql

How to delete multiple tables in MySQL

How MySQL connects to remote SQL

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.