MySQL stops randomly
Posted: Thu Dec 18, 2014 1:50 pm
I replied to a thread where someone is experiencing a similar problem, but I think it's best to start a new thread.
First I want to tell you that I am new to the VPS-world. I started learning and testing since 2 weeks. I tried some different panels but I find VestaCP the easiest to work with. About a week ago I started hosting my first website on a VPS. However I am having some problems.
So I have a problem with my MySQL server, it stops randomly. I searched for a solution and some people where having the same problem because their root password was incorrect in their /usr/local/vesta/conf/mysql.conf. So I changed the password and added the new password to /usr/local/vesta/conf/mysql.conf. But now I see I also have a /root/.my.cnf file. Does the password need to be changed there too? Because I am not sure if that is my old password (definitely not my new password).
When the MySQL server stops I can't restart it using the service panel on the vesta control panel. I have to restart my server to have it working correctly.
I am on a 768MB Vultr VPS (CentOS 6 x64, KVM, 1 CPU, SSD)
Currently I am hosting a small WooCommerce webshop. MySQL size: +-680KB, public_html size +- 80MB
I don't think it has to do something with ram anymore, because it was running fine before (but slow in my opinion) on a 5$ shared hosting package from Stablehost. Now it is much faster.
Some emails I received from my server:
Email 1
Subject: Error: Connection failed
Content: /usr/local/vesta/func/main.sh: line 55: [: 15 2014-12-16 02:15:02 v-update-database-disk admin admin_WPDB : integer expression expected
Email 2
Subject: admin → backup failed
Content: Can't connect to localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Free -m results:
(full) /var/log/mysqld.log:
EDIT/deleted: It looks like it wasn't full after all. I didn't notice I could change pages when I SSH on my server. I replied with the latest MySQL logs under this post. They are from yesterday and today. This morning I received the emails again.
/etc/my.cnf:
Let me know if you require more information. Please also let me know if I am sharing information that is too sensitive.
First I want to tell you that I am new to the VPS-world. I started learning and testing since 2 weeks. I tried some different panels but I find VestaCP the easiest to work with. About a week ago I started hosting my first website on a VPS. However I am having some problems.
So I have a problem with my MySQL server, it stops randomly. I searched for a solution and some people where having the same problem because their root password was incorrect in their /usr/local/vesta/conf/mysql.conf. So I changed the password and added the new password to /usr/local/vesta/conf/mysql.conf. But now I see I also have a /root/.my.cnf file. Does the password need to be changed there too? Because I am not sure if that is my old password (definitely not my new password).
When the MySQL server stops I can't restart it using the service panel on the vesta control panel. I have to restart my server to have it working correctly.
I am on a 768MB Vultr VPS (CentOS 6 x64, KVM, 1 CPU, SSD)
Currently I am hosting a small WooCommerce webshop. MySQL size: +-680KB, public_html size +- 80MB
I don't think it has to do something with ram anymore, because it was running fine before (but slow in my opinion) on a 5$ shared hosting package from Stablehost. Now it is much faster.
Some emails I received from my server:
Email 1
Subject: Error: Connection failed
Content: /usr/local/vesta/func/main.sh: line 55: [: 15 2014-12-16 02:15:02 v-update-database-disk admin admin_WPDB : integer expression expected
Email 2
Subject: admin → backup failed
Content: Can't connect to localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Free -m results:
Code: Select all
total used free shared buffers cached
Mem: 742 673 69 0 23 76
-/+ buffers/cache: 573 169
Swap: 0 0 0
EDIT/deleted: It looks like it wasn't full after all. I didn't notice I could change pages when I SSH on my server. I replied with the latest MySQL logs under this post. They are from yesterday and today. This morning I received the emails again.
/etc/my.cnf:
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=70
max_user_connections=30
wait_timeout=10
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log
key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size=1M
read_buffer_size=1M
sort_buffer_size=2M
table_cache=1024
thread_cache_size=286
interactive_timeout=25
connect_timeout=5
max_allowed_packet=1M
max_connect_errors=1000
query_cache_limit=1M
query_cache_size=8M
query_cache_type=1
tmp_table_size=16M
#innodb_use_native_aio = 0
innodb_file_per_table
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid