MySQL is used in Windows 64-bit system on the fourth day, and MySQL on the fourth day

Source: Internet
Author: User
Tags mysql host

MySQL is used in Windows 64-bit system on the fourth day, and MySQL on the fourth day

1. Start/Close MySQL

(1) Start the MySQL service:Net start mysql


(2) Stop the MySQL service:Net stop mysql


2. log on to/out of MySQL

First, let's take a look at some important mysql parameters. The following table lists some important mysql parameters:


(1) view the version number: Enter mysql-V or mysql -- version. Note that-V is in uppercase.


(2) log on to MySQL

You must add parameters after mysql. Format: mysql-u root (User)-p-P port number-h mysql host name \ ip (Local Machine return address ).

For example, enter mysql-u root-p-P 3306-h 127.0.0.1, press enter, and enter the password to log on;


If the command line is the local machine where mysql is located and the default port is 3306, enter mysql-u root-p directly, and then enter the password.


(3) Exit MySQL

Enter any of the following to exit the MySQL service.

Mysql> exit;

Mysql> quit;

Mysql> \ q (note that the backslash is used here );

Here all three of my attempts can exit the MySQL service. The following is the input: exit;


3. Modify the MySQL prompt

Let's take a look at the frequently used prompt:


Before modifying the settings, check the default MySQL prompt:


(1) Specify parameters when connecting to the client

Format: mysql-u root-p -- prompt. For example, enter mysql-u root-p -- prompt \ h.


(2) After connecting to the client, use the prompt command to modify

The format is: mysql> prompt. For example, enter mysql> prompt \ u, and then enter prompt \ u @ \ h \ d> again.


Run the command to enter a database and check the result. Enter: USE test;


Iv. MySQL Common commands

(1) display the current server version: Select version ();


(2) display the current date and time:Select now ();

(3) display the current user: Select user ();


V. MySQL statement Specification

(1) All keywords and function names are in upper case (even if they are written in lower case, but to distinguish them, we recommend that all keywords and function names be in upper case ).

(2) The database name, table name, and field name are all in lowercase.

(3) The SQL statement must end with a semicolon.

The above is all the content of this article, hoping to help you learn.

Related Articles:

MySQL first came into contact with MySQL on the first day of study

Install and configure MySQL winx64 the next day

MySQL verification in Windows 64-bit operating system on the third day

Thank you for reading this article. Make sure that you keep up your efforts!

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.