Tag: MySQL grant select Drop Update.
show databases; See which libraries are available
Use DB; Show tables; View a table for a library
Desc TB; view the fields of a table
Show CREATE TABLE tb\g; View the Build Table statement
Selectuser (); which user is currently
Select Database (); Current Library
Select version (); View Database Version
Showstatus; View MySQL Status
Set global max_connect_errors = 1000; modifying MySQL parameters
Show Processlist; View MySQL Queue
Grantall on * * to User1 identified by ' 123456 '; create a regular user and authorize
Grant all on db1.* to ' user2 ' @ ' 10.0.2.100 ' identified by ' 111222 ';
Grant all on db1.* to ' User3 ' @ ' percent ' identified by ' 231222 '; (Percent semicolon '% ' indicates a wildcard)
select * from Tb1\g; Enquiry
Update tb1 set id=5 where name= ' 55 '; Update Data
TRUNCATE TABLE aming.tb1; empty table (library name . table name)
Delete from tb1 where name= ' 55 '; Delete the specified line
drop table tb1; Delete a table
Drop database db1; Deleting a database
Repair table db1.tb1; Repair Table
This article is from the Linux OPS blog, so be sure to keep this source http://zhumy.blog.51cto.com/11647651/1793831
MySQL Common operations