1.數據庫的定義
4.數據庫的設置
systemctl restart mariadb ##重啟服務
mysql -uroot -p #使用超級用戶輸入密碼登錄數據庫
;結尾
5、數據庫管理
desc user; 顯示用戶表結構
alter table user drop class; #移除表中某一字段
DELETE FROM user WHERE username=‘xiaoli’; # 刪除表中的某一行
6.用戶授權
此處的"localhost",是指該用戶只能在本地登錄,不能在另外一臺機器上遠程登錄。如果想遠程登錄的話,將"localhost"改為"%",表示在任何一臺電腦上都可以登錄。也可以指定某臺機器可以遠程登錄。
2.查找用戶
3.刪除用戶
4.用戶分配權限
to bruce@’%’; 授予用戶“bruce”通過外網IP對于該數據庫“testdb”中表的創(chuàng)建、修改、刪除權限,以及表數據的增刪查改權限
to test@’localhost’;
5.數據庫的備份
mysqldump -uroot -predhat user > /opt/user.sql #將庫lala備份到/opt/user.sql 文件