Quick access and common commands on Mysql on Linux

  
        

Mysql Quick Entry and Common Commands on Linux

1. Command to log in to mysql

mysql -haddress -uuser -ppassword

-h followed by ip< Br>

-u is followed by the username

-p followed by the password

example :

mysql -h127.0.0.1 -uroot -p123456

mysql -uroot -p

Enter the local database, enter the password after the carriage return

2, enter a database

use databasename;

Use is followed by the database name

For example, the user has the database nserver and clear two databases

show databases;–>View database

use Nserver; –>Enter nserver library

show tables; –>View Table

Copyright © Windows knowledge All Rights Reserved