要配置一下mariadb,在网上找到两种方式,该用哪种呢?
第一种:原链接http://my.oschina.net/iluckyboy/blog/215949?fromerr=8cxOEORh
5.修改配置文件/etc/my.cnf.d/mysql-clients.cnf,重点是[client],其他的可以参考
[client]
port = 3307
socket = /var/data/db/mariadb/mysql.sock
[mysql]
no-auto-rehash
[mysqldump]
quick
max_allowed_packet = 64M
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
6.修改配置文件/etc/my.cnf.d/server.cnf,这里的性能参数来自my-large.ini文件
[mysqld]
port = 3307
datadir = /var/data/db/mariadb
socket = /var/data/db/mariadb/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 64M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
log-bin=mysql-bin
binlog_format=mixed
server-id = 1
第二种:原链接http://www.tuicool.com/articles/yqQnqei
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf #拷贝配置文件(注意:如果/etc目录下面默认有一个my.cnf,直接覆盖即可)
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。