欢迎投稿

今日深度:

MySQL常用命令.md,

MySQL常用命令.md,


链接数据库

## -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 , 与北京时间不对

www.htsjk.Com true http://www.htsjk.com/Mysql/40881.html NewsArticle MySQL常用命令.md, 链接数据库 ## -h/-u这些后面没有空格./bin/mysql -h[ip地址] -P[端口号] -u[用户名] -p[密码] 查看建表语句 show create table [table_name] 列出所有的数据库 show databases; 列出所有的...
相关文章
    暂无相关文章
评论暂时关闭