鏈接資料庫
## -h/-u這些后面沒有空格
./bin/mysql -h[ip地址] -P[埠號] -u[用戶名] -p[密碼]
查看建表陳述句
show create table [table_name]
列出所有的資料庫
show databases;
列出所有的表
show tables;
模糊查找表名
show tables like '%aaa%';
client鏈接mysql的常用引數
jdbc:mysql://127.0.0.1:3306/mubiao?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=Asia/Shanghai
- useUnicode : 使用轉碼
- characterEncoding : 指定編碼方式
- useSSL : 是否使用SSL方式登錄
- serverTimezone : 指定資料庫服務的時區 . 否則datatime欄位的時區默認為+0 , 與北京時間不對
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/89089.html
標籤:MySQL
上一篇:MySQL基礎篇(04):存盤程序和視圖,用法和特性詳解
下一篇:加密sqlite3資料庫檔案
