允许本地访问端口:iptables -P OUTPUT ACCEPT
1、yum install mysql
2、yum install mysql-server
3、删除MySQL数据库中user表中user为空的记录;
4、执行以下sql语句
use mysql;
mysql> UPDATE user SET password=password("root") WHERE user=‘root‘;
mysql> flush privileges;
mysql> exit;
5、创建数据库以及表信息
CREATE DATABASE `websitedb` /*!40100 DEFAULT CHARACTER SET utf8 */;
CREATE TABLE `website` (
`id` int(11) NOT NULL,
`url` varchar(256) DEFAULT NULL,
`ip` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `monitor_website` (
`id` int(11) NOT NULL,
`ip` varchar(45) DEFAULT NULL,
`url` varchar(45) DEFAULT NULL,
`desc` varchar(45) DEFAULT NULL,
`check_inteval` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `task` (
`id` int(11) NOT NULL,
`begin_time` varchar(45) DEFAULT NULL,
`end_time` varchar(45) DEFAULT NULL,
`feedback_inteval` int(11) DEFAULT NULL,
`task_name` varchar(128) DEFAULT NULL,
`task_status` int(11) DEFAULT NULL,
`task_type` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
以下为卸载MySQL需执行语句
rm -fr /usr/lib/mysql
rm -fr /usr/include/mysql
rm -f /etc/my.cnf
rm -fr /var/lib/mysql
以下为分配权限:
GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
flush privileges;
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘root‘ WITH GRANT OPTION;
以下为安装jdk
yum install java