Files
order/linux数据库操作
2023-10-23 00:29:29 +08:00

17 lines
393 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
linux数据库操作
mysql -uroot -p
数据库密码123456
创建数据表
数据库名food_db
CREATE DATABASE `food_db` DEFAULT CHARACTER SET = `utf8mb4`;
查看表
show databases;
进入数据表
use food_db;
show tables;
select * from user ;
show create table user;
1. 开启mysql service mysqld start
2. 查看mysql是否开启 ps -ef |grep mysql