Redhat7配置乙個資料庫

2021-09-19 05:16:18 字數 910 閱讀 9018

描述:在 system1 上建立乙個 mariadb 資料庫, 名為 contacts ,並符合以下條件:

資料庫應該包含來自資料庫複製的內容,複製檔案的url為 。

資料庫只能被 localhost 訪問。

除了root使用者, 此資料庫只能被使用者 luigi 查詢。 此使用者密碼為 flectrag 。

root 使用者的密碼為 flectrag , 同時不允許空密碼登入。

yum groupinstall mariadb mariadb-client mariadb-server

vim /etc/my.cnf

skip-networking=1

啟動mariadb

重啟儲存

mysql

showdatabase

create database contacts;

use contacts;

source /root/mariadb.dump;

show tables;

grant select on contacts.* luigi@'localhost' identified by 'flectrag'

exit

mysql_secure_installation

設定root密碼

移除匿名使用者

禁止遠端登陸

移除初始資料庫

mysql -u root -p

use contacts;

show tables;

selete * from department;

selete * from employee;

select * from employee where emp_names='jack'';

記錄乙個Redhat7下關於yum的問題

系統重啟後準備使用yum命令安裝乙個軟體包,但是在安裝的過程 現如圖所示錯誤 root coisini yum install y tree loaded plugins product id,search disabled repos,subscription manager this syste...

如何用乙個資料庫的資料去更新另乙個資料庫的內容

愚翁 如何用乙個資料庫的資料去更新另乙個資料庫的內容 上次寫了乙個簡單資料庫之間資料交換的程式,但是考慮到如果資料量大的情況,我所使用的 dataadatper dataset 方法,在效能上就有很大的劣勢。不過,要想在資料量大的資料庫之間能高效地交換,就需要捨棄原先的方法,而改用 dbcomman...

MySQL多資料庫合併到乙個資料庫

背景 將多台mysql伺服器上的庫合併到一台 實現原理 如果分平台給的資料是sql那第3 4 5步可以省略 1 首先用innobackupex將原資料庫檔案匯出 2 建立新的資料庫 3 innobackupex將原資料庫檔案依次匯入到新庫 關閉資料庫 service mysqld stop 移動da...