Mysql commands
mysql -u -p
| function | command | Comments |
|---|---|---|
| show info of all users in mysql | select * from mysql.user; | |
| show 3 columns of users | select host, user, password from mysql.user; | |
| show fields of table user | desc mysql.user; | |
| SELECT count(*) as total from test_schema | get count |
Create a table:
CREATE table if not exists test_product (
P_I int unsigned not null primary key auto_increment,
PNAME varchar(45) not null,
PRICE int
);
Insert a record into a table:
INSERT INTO
cv2.test_product
VALUES
(2,
‘B’,
200);
MYSQL Workbench
A GUI tool for MYSQL.

本文介绍了MySQL中的常用命令,包括查看所有用户信息、显示特定字段、创建及插入数据到表等基本操作。此外还提到了MySQL Workbench这一图形界面工具。
2210

被折叠的 条评论
为什么被折叠?



