时间:2021-07-01 10:21:17 帮助过:2人阅读
配置
默认的/etc/my.cnf基本啥都没,参考版本:http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
最小版本:
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Recommended in standard MySQL setup sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES port=3306 collation-server = utf8_unicode_ci init-connect=‘SET NAMES utf8‘ character-set-server = utf8 default-storage-engine=InnoDB #default-table-type=InnoDB [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
创建mysql用户略
安装默认数据库!
mysql_install_db --datadir=/var/lib/mysql
启动服务
mysqld_safe
用service mysqld restart只会掉进很深很深的坑,此处省略一万字。
转载请注明本文来源:http://www.cnblogs.com/Tommy-Yu/p/5501861.html
谢谢!
centos7 & mysql
标签: