Corrupted settings as a result of MySQL optimization with Cyberpanel Cloud in Ubuntu 18

hello, i have a little problem. I have been using cyberpanel in centos 7 for a few years and I have no problems. But a few days ago I started using ubuntu 18 on a second vds server. I made the connection with Cyberpanel Cloud. Then I performed mysql optimization. Then something started to go wrong in mysql. After typing the username and password on the Cyberpanel login screen, it stopped responding when the login button was pressed. When I tested the lines in my my.cnf file one by one, I noticed that this problem was resolved when I removed the [mysqld] line. In this case, I think the optimization falls short. Because although the server load is idle, ram usage is 90 percent as you can see in the screenshot. How can I overcome this problem?

port                           = 3306
socket                         = /var/run/mysqld/mysqld.sock


user                           = mysql
default-storage-engine         = InnoDB
socket                         = /var/run/mysqld/mysqld.sock
pid-file                       = /var/lib/mysql/

# MyISAM #
# key-buffer-size                = 32M
# myisam-recover                 = FORCE,BACKUP

max-allowed-packet             = 16M
max-connect-errors             = 1000000
sql-mode                       = NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
sysdate-is-now                 = 1
innodb-strict-mode             = 1

datadir                        = /var/lib/mysql

server-id                      = 360468


max-connections                = 500
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
thread-cache-size              = 50
open-files-limit               = 65535
table-definition-cache         = 1024
table-open-cache               = 2048

innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 2
innodb-log-file-size           = 64M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 307M

log-error                      = /var/lib/mysql/mysqld.log
slow-query-log                 = 1
slow-query-log-file            = /var/lib/mysql/mysqld-slow.log
log-queries-not-using-indexes  = OFF
long_query_time                = 30

max-allowed-packet             = 16M

Can you install the latest version of Ubuntu - 20.04.3 - and see if it works?

Delete binary logging codes from the file as it adds heavy log files making use of server storage and server resources heavily.

i tried this. actually it was going well in the beginning but everything was ruined due to ubuntu’s constant asking questions while upgrading. Since I was away from the computer during the update, I could not answer a question and therefore the connection timed out. So the server crashed. Fortunately the server was empty. My Ubuntu experience has been short and sad. Now I installed centos 7, I did all my work from the beginning and I optimized it.
I’m in love with Centos. Set it up and forget it. I plan to continue until support ends in 2024, then I can switch to Alma. I hope I do not encounter such a situation during the transition. Otherwise, it may not take that short to get things together this time. Actually, I’m curious about rocky linux. It would be great if Cyberpanel supports it.

Actually, I didn’t add those codes. I just added the expire_logs_days=3 line. If I hadn’t added this, the system had kept 20 gb of logs before. and it kept logs so much without these optimization codes.

1 Like

Try Almalinux as its been going to be officially supported by Cyberpanel. I am using it currently and works perfect. Better to use Almalinux than Centos7