1
爲了記錄數據庫項目操作的作者憑據(如創建或更新操作),我使用了以下的架構:獲取mysql.user唯一ID?
CREATE TABLE Items
(id integer not null primary key auto_increment
, Item_data varchar(50) not null
, Item_lastmodified_author_name varchar(50) not null
, Item_lastmodified_author_host varchar(100) not null
, foreign key (Item_lastmodified_author_name) references mysql.user (User)
, foreign key (Item_lastmodified_author_host) references mysql.user (Host)
);
是沒可能使這個具有獨特的MySQL更容易。用戶標識參考?
一個MySQL服務器用於3個團隊。每個團隊都有自己的數據庫。因爲MySQL查詢將從客戶端完成。我不希望用戶是一個團隊的成員,能夠更改另一個團隊數據庫中的任何內容。
我正確的做法嗎?
好的權限,但沒有辦法獲得作爲錄製字段的用戶ID?例如,在數據庫中保存誰是項目所有者的知識? – Erwan
謝謝你的回答! – Erwan