渗透测试基础知识----MySQL 配置

MySQL 配置

1、创建mysql运行使用的用户mysql

$ /usr/sbin/groupadd mysql$ /usr/sbin/useradd -g mysql mysql

2、创建binlog和库的存储路径并赋予mysql用户权限

$ mkdir -p /usr/local/webserver/mysql/binlog /www/data_mysql$ chown mysql.mysql /usr/local/webserver/mysql/binlog/ /www/data_mysql/

3、创建my.cnf配置文件

将/etc/my.cnf替换为下面内容

$ cat /etc/my.cnf[client]port = 3306socket = /tmp/mysql.sock[mysqld]replicate-ignore-db = mysqlreplicate-ignore-db = testreplicate-ignore-db = information_schemauser = mysqlport = 3306socket = /tmp/mysql.sockbasedir = /usr/local/webserver/mysqldatadir = /www/data_mysqllog-error = /usr/local/webserver/mysql/mysql_error.logpid-file = /usr/local/webserver/mysql/mysql.pidopen_files_limit = 65535back_log = 600max_connections = 5000max_connect_errors = 1000table_open_cache = 1024external-locking = FALS

你可能感兴趣的:(mysql,数据库,服务器,网络安全,渗透测试)