Something unusual on my mysql server

  • good afternoon


    First I am very sorry for my bad English, I use a translator software.


    A curious situation happens to me in a small vps, and that is that I have mounted a monitor for the mysql server ..
    and what was my surprise after mounting it, that when I stop the server, the monitor does not detect the change of state
    looking more closely I notice that mysqld.pid and mysql.sock, are still active ..., my server is inactive but the processes remain the same as it was working


    ... something weird that has led me to look at the status of mysql


    Viewing the status returns this data


    Shell-Script
    1. mysql.service - LSB: Start and stop the mysql database server daemonLoaded: loaded (/etc/init.d/mysql)Active: active (running) since Wed 2017-12-20 18:45:15 CET; 24min agoProcess: 1173 ExecStop = / etc / init.d / mysql stop (code = exited, status = 1 / FAILURE)Process: 1197 ExecStart = / etc / init.d / mysql start (code = exited, status = 0 / SUCCESS)CGroup: /system.slice/mysql.service├─ 860 / bin / sh / usr / bin / mysqld_safe└─1501 / usr / sbin / mysqld --basedir = / usr --datadir = / var / lib / mysql --plugin-dir = / usr / lib / mysql / plugin --user = mysql --log-error = /var/log/mysql/error.log --pid-file = / var / run / mysqld / mysqld ....Dec 20 18:45:15 relay3 systemd [1]: mysql.service: control process exited, code = exited status = 1Dec 20 18:45:15 relay3 systemd [1]: Unit mysql.service entered failed state.Dec 20 18:45:15 relay3 systemd [1]: Starting LSB: Start and stop the mysql database server daemon ...Dec 20 18:45:15 relay3 mysql [1197]: Starting MySQL database server: mysqld already running.Dec 20 18:45:15 relay3 systemd [1]: Started LSB: Start and stop the mysql database server daemon.

    The server gives an error, in the stopping sequence

    Code
    1. Process: 1173 ExecStop = / etc / init.d / mysql stop (code = exited, status = 1 / FAILURE)


    It is a process that does not exist,


    Some of you have had or know why you can produce this situation, because I have googled a lot and I do not see an error in memory, in the databases and the truth ... I do not know what can be a reason for this


    Working with mysql server 5.5
    Panel ver. 1.5.1
    Debian jessie


    Thank you

  • @kurgan


    Does the debian-sys-maint SQL user's password correct? Please look at the /etc/mysql/debian.cnf file, then, try to connect using the debian-sys-maint SQL user and password.


    If you don't figure out alone, send me the access data.


    See also: https://serverfault.com/questi…maint-mysql-user-and-more

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • You have all the reason,


    that small vps .. is mounted for a long time and I have changed it times, and I had never thought about the user debian ... as it has always worked ... I had not repaired that data.


    The command

    Shell-Script
    1. mysql -udebian-sys-maint -p`grep password /etc/mysql/debian.cnf|head -n1 | awk '{print $ 3}'


    it does not work you are right ..., at some point I lost the original configuration
    If you do not care ... I trust more in your hands than in mine and can generate a correct password


    .. Thank you always for your support and help

  • @kurgans


    Fixed ;)

    Shell-Script
    1. root@relay3:~# service mysql status● mysql.service - LSB: Start and stop the mysql database server daemonLoaded: loaded (/etc/init.d/mysql)Active: active (running) since mié 2017-12-20 19:26:31 CET; 36min agoProcess: 2915 ExecStop=/etc/init.d/mysql stop (code=exited, status=1/FAILURE)Process: 2939 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)CGroup: /system.slice/mysql.service├─ 860 /bin/sh /usr/bin/mysqld_safe└─1501 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/...dic 20 19:26:31 relay3 mysql[2939]: Starting MySQL database server: mysqld already running.dic 20 19:26:31 relay3 systemd[1]: Started LSB: Start and stop the mysql database server daemon.
    Shell-Script
    1. root@relay3:~# service mysql stop
    Shell-Script
    1. root@relay3:~# service mysql status● mysql.service - LSB: Start and stop the mysql database server daemonLoaded: loaded (/etc/init.d/mysql)Active: inactive (dead) since mié 2017-12-20 20:03:30 CET; 1s agoProcess: 5230 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)Process: 2939 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)dic 20 19:26:31 relay3 mysql[2939]: Starting MySQL database server: mysqld already running.dic 20 19:26:31 relay3 systemd[1]: Started LSB: Start and stop the mysql database server daemon.dic 20 20:03:28 relay3 systemd[1]: Stopping LSB: Start and stop the mysql database server daemon...dic 20 20:03:30 relay3 mysql[5230]: Stopping MySQL database server: mysqld.dic 20 20:03:30 relay3 systemd[1]: Stopped LSB: Start and stop the mysql database server daemon.
    Shell-Script
    1. root@relay3:~# service mysql start
    Shell-Script
    1. root@relay3:~# service mysql status● mysql.service - LSB: Start and stop the mysql database server daemonLoaded: loaded (/etc/init.d/mysql)Active: active (running) since mié 2017-12-20 20:03:42 CET; 9min agoProcess: 5230 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)Process: 5297 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)CGroup: /system.slice/mysql.service├─5324 /bin/sh /usr/bin/mysqld_safe└─5705 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/...dic 20 20:03:42 relay3 mysql[5297]: Starting MySQL database server: mysqld ..dic 20 20:03:42 relay3 mysql[5297]: Checking for tables which need an upgrade, are corrupt or weredic 20 20:03:42 relay3 mysql[5297]: not closed cleanly..dic 20 20:03:42 relay3 systemd[1]: Started LSB: Start and stop the mysql database server daemon.

    I've connected using the imscp_user i-MSCP master SQL user and I've updated the debian-sys-maint user password:

    You can see the password that I've set by looking into the /etc/mysql/debian.cnf file.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206