Simple Mysql operation and mysql operation
// Mysql version: 5.7.13
1. Run the command prompt as an administrator and go to the mysql installation location.
2. start the mysql service: net start mysql
3. Log On As A root user: mysql-uroot-p enter key
4. list all databases: show databases;
5. create a database: create databasesDatabase_Name;
6. Check whether the database is created again: create databases if not existsDatabase_Name;
7. delete a database: drop databaseDatabase_Name;
8. Select a database: useDatabase_Name;
9. list all data tables in the selected Database: show tables;
10. show columns fromTable_Name; Or: describeTable_Name;
11. select the display data table: select * fromTable_Name;
12. data table with conditions: select * fromTable_Name WhereId> = 2;
13. create a data table: create tableTable_Name(Col_01_NameType Details,Col_02_NameType Details ,...);
14. First judge and then create a data table: create table if not existsTable_Name(...);
15. Copy a data table: create tableTable_Name_01Select * fromTable_Name_02;
16. Rename the data table: alter tableTable_NameRenameNew_Table_Name; Or: rename tableOld_NameToNew_Name;
17. delete a data table: drop tableTable_Name;
18. Add a record to the data table: insertTable_NameSetCol_01=Value1,Col_02=Value2;
19. Modify the record in the data table: updateTable_NameSetCol_Name=New_ValueWhereId= 1;
20. delete the record in the data table: delete fromTable_Name;
21. Deletion of records in a data table with conditions: delete fromTable_NameWhereId= 1;
22. # view the current time: select now ();
23. # current user: select user ();
24. # current database program version: select version ();
25. # Current status: show status;
26. # view the connected user: show processlist;