建立資料庫!

2022-05-21 02:35:57 字數 341 閱讀 4000

注意:建立資料庫之前要先連線mysql伺服器。

1) 建立乙個名為xhkdb的資料庫:

mysql> create database xhkdb;

2) 建立資料庫並分配使用者:

create database 資料庫名;

grant select,insert,update,delete,create,drop,alter on 資料庫名.* to 資料庫名@localhost identified by '密碼';

set password for '資料庫名'@'localhost' = old_password('密碼');

依次執行3個命令完成資料庫建立。

資料庫建立

刪除資料庫 drop database cpxs 資料庫操作語法 建立資料庫 create database database name on 子句 資料檔案屬性 primary 指定主檔案,否則預設第乙個 n 檔案屬性 filegrowth growth increament n 檔案組 log ...

建立資料庫

1.建立表空間 create tablespace test space logging datafile f oracle oracledata test.ora size 5m extent management local uniform segment space management au...

建立資料庫

建立乙個資料庫 binbin 有乙個主要資料庫檔案 bin.mdf 乙個次要資料庫檔案組 jay 裡面有次要資料檔案 jay 1.ndf,jay 2.ndf 乙個日誌文志檔案 ziji.ldf 判斷是否存在此資料庫,若存在就刪除 if exists select from sysdtabases w...