#Create mariadb user
CREATE USER'admin'@'%' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, UPDATE, DELETE ON hosts_info.* TO 'admin'@'%';
FLUSH PRIVILEGES;
创建库并创建数据表
#创建库
CREATE DATABASE hosts_info;#创建表
CREATE TABLE host_tmp (ip VARCHAR(50) NOT NULL,
username VARCHAR(15) NOT NULL,
password VARCHAR(50) NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;