2

docker 下操作 mysql

 1 year ago
source link: https://yjyj.net/learn/6407.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

docker 下操作 mysql

2023-05-10

当然只要一条命令:
docker exec -it mysql bash
接着链接数据库
mysql -uroot -p123456
查看数据库
show databases;
切换数据库
use 数据库名;
查看正在使用的数据库
select database();
查看表
show tables;
查看表结构
desc xxx;
更新表记录
update 表名 set 字段名=值,字段名=值; update 表名 set 字段名=值,字段名=值 where 条件;


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK