Mysql and mysql
1. How to log on to mysql
Run mysql-u 'your username'-p in linux and press Enter. Enter the password to log on to mysql.
2. Display mysql Databases
Run the show databses command in the mysql command line.
3. How to Select a database
After the show databases command is used to display the database, you can use the use command to select the database. For example, use test
4. view the table structure
Run the desc command to view the table structure.
5. display the current Login User
Use the show user (); command to display the current user
6. display the currently used database
Use the show database () command to display the database currently in use
7. SQL tone Classification
DDL: Data Definition Language, CREATE, DROP, ALTER
DML: data operation language UPDATE, INSERT, DELETE, SELECT
DCL: Permission Language grant revoke, COMMIT, ROLLBACK