系统版本:centos6.5 内核:2.6
第一步
初始化:

./bin/mysqld --initialize --user=mysql --datadir=数据存放路径 --basedir=安装包路径
第二步
./bin/mysql_ssl_rsa_setup --datadir=数据存放路径
第三部:
./bin/mysqld --defaults-file=配置文件路径 --user=root
第四步:(修改密码)
set password = password('tongda666');

注意:路径=后不能有空格

配置文件:

[client]
port = 3310
socket = /data/TOUBIAO/mysql-5.7.22/mysql.sock
[mysqld_safe]
[mysqld]
port = 3310
language =/data/TOUBIAO/mysql-5.7.22/share/english
log-error =/data/TOUBIAO/mysql-5.7.22/log/mysqld.log
basedir =/data/TOUBIAO/mysql-5.7.22
datadir =/data/TOUBIAO/mysql-5.7.22/data
socket = /data/TOUBIAO/mysql-5.7.22/mysql.sock
slow_query_log = on
long_query_time = 1
min_examined_row_limit = 1
lower_case_table_names=1
innodb_buffer_pool_size = 6G
innodb_flush_log_at_trx_commit = 2
[mysqldump]
[mysql]
[myisamchk]
[mysqlhotcopy]
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION