MySQL Basic knowledge Summary

Source: Internet
Author: User

About MySQL

(1) MySQL is a relational database management system developed by the Swedish Mysqlab company, currently owned by Oracle Corporation. MySQL is the most popular relational database management system, and in Web applications MySQL is one of the best RDBMS (relational database Management system: relational databases Management systems) application software.

(2) MySQL is an associated database management system that keeps data in separate tables rather than putting all of the data in a large warehouse, which increases speed and increases flexibility.

(3) The SQL language used by MySQL is the most commonly used standardized language for accessing databases. Because of its small size, fast speed, low total cost of ownership, especially the open source of this feature, the general development of small and medium-sized web sites have chosen MySQL as the site database. Thanks to the performance of its community edition, PHP and Apache make a good development environment.


Start the MySQL server

sudo service MySQL start

sudo service MySQL stop

sudo service MySQL restart

Script actions

Sudo/etc/init.d/mysql start

Sudo/etc/init.d/mysql stop

Sudo/etc/init.d/mysql restart


Linked server

Mysql-uroot-p

-u: Specify user name

-P: Specify password


Exit

"Quit" or "\q"


Input query

Query MySQL's version number and current date

Select VERSION (), current_date ();

VERSION () Current_date ()
5.5.43-0buuntu0.14.04.1 2015-10-06

Select Now (), user ();

Select Now (), USER ();

The above two ways of writing are equivalent to the case of MySQL; keyword recommended capitalization


If you decide that you do not want to execute a command being entered, enter "\c" to cancel it;


The following table shows the various prompts that you can see and briefly describes the status of the MySQL that they represent:

Prompt Meaning
Mysql>
Be ready to accept the new command
-
Wait for the next line of multiple lines of command
' > Wait for the next line, waiting for the end of the string to begin with the single quotation mark "'"
"> Wait for the next line, waiting for the end of the string to begin with double quotation marks "" "
' > Wait for the next line, waiting for the end of the string to begin with the backslash "'"
/*
Wait for the next line, and wait for the end of the comment to start with "/*"


This article is from the "Ouyangjun" blog, make sure to keep this source http://ouyangjun.blog.51cto.com/10284323/1700355

MySQL Basic knowledge Summary

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.