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