Page 1 of 2

Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 12:27 pm
by vestacp89
Hello,

I reboot vps,
after mysql stop work,
I restart mysql,
then all work,
but today come and see website is down again mysql was down,
again restart mysql and now all work,
where i can see why this happend ?
and how i can fix this ?

This is messeage which i get on email:

Code: Select all

Can't connect to localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Thanks.

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 2:01 pm
by sim
Paste last 20 lines of /var/log/mysqld.log

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 2:03 pm
by joem
vestacp89 wrote:Hello,

I reboot vps,
after mysql stop work,
I restart mysql,
then all work,
but today come and see website is down again mysql was down,
again restart mysql and now all work,
where i can see why this happend ?
and how i can fix this ?

This is messeage which i get on email:

Code: Select all

Can't connect to localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Thanks.
Centos
/var/log/mysqld.log
Ubuntu
/var/log/mysql.log
/var/log/mysql/error.log
Check out http://vestacp.com/docs/#config-log-loc ... hel-centos

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 2:47 pm
by vestacp89
joem wrote:
vestacp89 wrote:Hello,

I reboot vps,
after mysql stop work,
I restart mysql,
then all work,
but today come and see website is down again mysql was down,
again restart mysql and now all work,
where i can see why this happend ?
and how i can fix this ?

This is messeage which i get on email:

Code: Select all

Can't connect to localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Thanks.
Centos
/var/log/mysqld.log
Ubuntu
/var/log/mysql.log
/var/log/mysql/error.log
Check out http://vestacp.com/docs/#config-log-loc ... hel-centos
Hi,

How i can see this mysql.log ?
Which command is for this, or i can see this from vestacp ?

Thanks.

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 4:07 pm
by turkey3
To view it in the CLI, type:

Code: Select all

nano /var/log/mysql.log

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 5:00 pm
by sim
If you are using CentOS

tail /var/log/mysqld.log

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 5:24 pm
by vestacp89
turkey3 wrote:To view it in the CLI, type:

Code: Select all

nano /var/log/mysql.log
i use ubuntu, when i enter this show me:

Code: Select all

-bash: nano: command not found

Re: Mysql stop after reboot vps

Posted: Wed Nov 26, 2014 10:58 pm
by joem
vestacp89 wrote:
turkey3 wrote:To view it in the CLI, type:

Code: Select all

nano /var/log/mysql.log
i use ubuntu, when i enter this show me:

Code: Select all

-bash: nano: command not found

Code: Select all

sudo apt-get install nano
sudo nano /var/log/mysql.log

Re: Mysql stop after reboot vps

Posted: Thu Nov 27, 2014 10:37 am
by vestacp89
joem wrote:
vestacp89 wrote:
turkey3 wrote:To view it in the CLI, type:

Code: Select all

nano /var/log/mysql.log
i use ubuntu, when i enter this show me:

Code: Select all

-bash: nano: command not found

Code: Select all

sudo apt-get install nano
sudo nano /var/log/mysql.log
now i see:

Code: Select all

^G Get Help               ^O WriteOut               ^R Read File              ^Y Prev Page              ^K Cut Text               ^C Cur Pos
^X Exit                   ^J Justify                ^W Where Is               ^V Next Page              ^U UnCut Text             ^T To Spell
what i need to write ''^R'' for see file ? I add this and not happend nothing ?

Thanks.

Re: Mysql stop after reboot vps

Posted: Sat Nov 29, 2014 1:53 pm
by vestacp89
anyone explain ? how to see mysql log file ?

Thanks.