MYSQL之增刪改查
增
create database 創建庫
create table 創建表
insert into 表 values();
刪
DROP database 刪除庫
DROP table 刪除表
DELECT
改
alter table xxxx rename to xxxx
update 表名 set 字段名=‘新內容’ + where條件
查
SHOW
DEST
常用sql語句
FLUSH PRIVILEGES; 重新加載權限表
update mysql.user set password=PASSWORD(‘123’)where USER=‘root’; 修改root用戶密碼
mysqladmin -u root -p password 123 修改初始化密碼
當mysql登錄密碼忘記時 可以通過修改配置文件
/etc/my.cnf
skip-grant-tables=1
修改之後重啓即可免密進入MySQL重置密碼