Jump to content

  •  

Staff applications open!

We are looking for dedicated members to join the Community Team to help enforce the community rules and make IV a better place for everyone.
Do you think you have what it takes to join? Apply here: http://invision-viru...f-applications/
IV Management

- - - - -

Cyberpanel Mysql Tuning


  • Please log in to reply
No replies to this topic

#1 Meg015

Meg015

    Newbie

  • Member
  • Pip
  • 5 posts

Posted 30 August 2019 - 05:53 PM

Hi, I am interested in hosting control panels. And I want to share with you the mysql configuration I made for my own sites. I tried this configuration in cyberpanel and it works really well. You can add the following configurations to /etc/my.cnf.d/server.cnf. Take mysql restart after adding.


[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
[mysqld]
user= mysql
pid-file= /var/lib/mysql/mysql.pid
socket= /var/lib/mysql/mysql.sock
port= 3306
datadir= /var/lib/mysql
open_files_limit=50000
max_allowed_packet=268435456
innodb_buffer_pool_size=1G
innodb_log_file_size=256M
innodb_flush_method=O_DIRECT
innodb_io_capacity=1000
innodb_old_blocks_time=1000
innodb_open_files=5000
key_buffer_size=16M
read_buffer_size=256K
read_rnd_buffer_size=256K
query_cache_size=256M
query_cache_limit=5M
join_buffer_size=4M
sort_buffer_size=4M
max_heap_table_size=64M
tmp_table_size=64M
table_open_cache=4500
table_definition_cache=4000
thread_cache_size=50
[mysqld1]
user= mysql
pid-file= /var/lib/mysql1/mysql.pid
socket= /var/lib/mysql1/mysql.sock
port= 3307
datadir= /var/lib/mysql1
open_files_limit=50000
max_allowed_packet=1073741824
innodb_buffer_pool_size=1G
innodb_log_file_size=256M
innodb_flush_method=O_DIRECT
innodb_io_capacity=1000
innodb_old_blocks_time=1000
innodb_open_files=5000
key_buffer_size=16M
read_buffer_size=256K
read_rnd_buffer_size=256K
query_cache_size=256M
query_cache_limit=5M
join_buffer_size=4M
sort_buffer_size=4M
max_heap_table_size=64M
tmp_table_size=64M
table_open_cache=4500
table_definition_cache=4000
thread_cache_size=50





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users