- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認(rèn)證網(wǎng)站身份V標(biāo)記
- 域名注冊服務(wù)機(jī)構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機(jī)構(gòu):新網(wǎng)數(shù)碼
1.開啟和關(guān)閉
net stop mysql #停止mysql
net start mysql #開啟mysql
2.創(chuàng)建表,如:
create table myclass
3.刪除
drop table myclass; #刪除表
delete from myclass; #清空表
drop myclass #刪除表
4.導(dǎo)入導(dǎo)出數(shù)據(jù)庫
導(dǎo)出數(shù)據(jù):
mysqldump --opt test > d:db_name.sql #備份數(shù)據(jù)庫
mysql -udb_user -pdb_password db_name < d:db_name.sql #還原數(shù)據(jù)庫
5.修復(fù)表
repair table table_name; #修復(fù)表
6.進(jìn)入mysql服務(wù)
mysql -uuser -ppassword
7.相關(guān)的基本查詢
show databases; #查看所有數(shù)據(jù)庫
use db_name; #選擇某個數(shù)據(jù)庫
show talbes; #查看選擇后的某數(shù)據(jù)庫所有表
8.創(chuàng)建用戶名create user name;
給用戶賦登錄密碼update mysql.user set password=password('password1') where user="name"; 也可以在root用戶下用此命令修改其他數(shù)據(jù)庫密碼。
給用戶授予所有的權(quán)限grant all privileges on *.* to name@"%" Identified by "password1" with grant option;
提交成功!非常感謝您的反饋,我們會繼續(xù)努力做到更好!
這條文檔是否有幫助解決問題?
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP