歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux上Mysql快速進入及常用命令

Linux上Mysql快速進入及常用命令

日期:2017/8/19 9:49:10   编辑:關於Linux

Linux上Mysql 快速進入及常用命令

1、登錄mysql 的命令

mysql -haddress -uuser -ppassword

-h 後面帶的是ip

-u 後面帶的是用戶名

-p 後面帶是密碼

example :

mysql -h127.0.0.1 -uroot -p123456

mysql -uroot -p

進入本地數據庫,回車後輸入密碼

2、進入某個數據庫

use databasename;

use 後面帶的是數據庫名稱

譬如該用戶有數據庫nserver 和 clear 這兩個數據庫

show databases;–>查看數據庫

use nserver; –>進入nserver庫

show tables; –>查看表

Copyright © Linux教程網 All Rights Reserved