***********************************遇到的错误***********************************************************
Installing MySQL system tables...2014-12-04 23:37:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-12-04 23:37:26 1438 [Warning] Can't create test file /home/ipdev/data/localhost.lower-test 错误1
2014-12-04 23:37:26 1438 [Warning] Can't create test file /home/ipdev/data/localhost.lower-test
2014-12-04 23:37:26 1438 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000) 错误2
*********************************************************************************************************
解决办法
1
2
3
4
5
6
7
8
9
10
11
错误1的解决办法:
sudo chown -R mysql.mysql data
而非
sudo chown -R mysql.mysql data
错误2的解决办法
# sudo vim /etc/security/limits.conf
末尾行增加如下信息
* soft nofile 65535
* hard nofile 65535
普通用户需要重新登录,才能生效,查看命令umilit -n
6、修改补充Mysql配置文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ vim ~/mysql/my.cnf
[mysqld]
添加如下行
user = mysql
port = 3306
server_id = 1
socket = /tmp/mysql.sock
basedir = /home/ipdev/mysql/
datadir = /home/ipdev/data/
log-error = /home/ipdev/data/mysql-error.log
pid-file = /home/ipdev/data/mysql.pid
log-bin = /home/ipdev/data/mysql-bin.log
open-files-limit = 10240
skip_name_resolve=1
innodb_file_per_table=1