数据库初始化报错,没有写权限

6 数据库初始化报错,没有写权限,
解决1:chmod 777 ,成功启动但进库无法读取数据目录中文件
解决2:(因为是堡垒机做了权限限制,要加sudo,以为目录的属主属组是mysql就可以不用,这个简单的道理,废了好几遍才知道。。。)sudo /usr/local/mysql/bin/mysqld --initialize --user…
[app@scf-mysql03 mysqldata]$ /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/data/mysqldata/veredplat --innodb_data_file_path=ibdata1:128M:autoextend
mysqld: Can’t create/write to file ‘/data/mysqldata/veredplat/is_writable’ (Errcode: 13 - Permission denied)
2018-10-23T06:47:09.239453Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-10-23T06:47:09.242675Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
2018-10-23T06:47:09.242731Z 0 [ERROR] Aborting

你可能感兴趣的:(初始化,MySQL)