shell> mysql --helpConnect to the server
shell> mysql -h hostname -u username -p database_name# hostname may be omitted for localhostDisconnect from the server
mysql> /q # or QUITGrant privileges for a user
mysql> GRANT ALL ON *.* TO 'username'@'ip_address' IDENTIFIED BY 'password';Switch database
mysql> use database_nameDisplay all databases
mysql> show databases;Display all tables
mysql> show tables;Get information of a table
mysql> describe table_name;
No comments:
Post a Comment