Add central_db.sql.php
This commit is contained in:
parent
f636743825
commit
c9d0247206
24
central_db.sql.php
Normal file
24
central_db.sql.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
USE NETWORK;
|
||||||
|
DROP TABLE IF EXISTS mDNS;
|
||||||
|
CREATE TABLE mDNS (
|
||||||
|
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
Host VARCHAR(255) NOT NULL,
|
||||||
|
Type ENUM('A','PTR','SRV') NOT NULL,
|
||||||
|
Name VARCHAR(255),
|
||||||
|
Data VARCHAR(1024)
|
||||||
|
);
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$hosts = [
|
||||||
|
["hostname" => "hostname01", "password" => "password01"],
|
||||||
|
];
|
||||||
|
foreach ($hosts as $host) : extract($host); ?>
|
||||||
|
|
||||||
|
DROP USER IF EXISTS '<?=$user?>'@'%';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
# awk '{print substr(\$2, length(\$2)-6,6)}' ~/.ssh/id_rsa.pub\n";
|
||||||
|
CREATE USER '<?=$user?>'@'%' IDENTIFIED BY '<?=$pass?>';
|
||||||
|
GRANT ALL PRIVILEGES ON NETWORK.mDNS TO '<?=$user?>'@'%';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
Loading…
x
Reference in New Issue
Block a user