mysql not listening on tcp port 3306

Discussion in 'ISPConfig 3 Priority Support' started by LinuxPete, Dec 18, 2017.

  1. LinuxPete

    LinuxPete Member HowtoForge Supporter

    Hi,
    In troubleshooting a recurring logrotate problem I found that mysql is not listening on tcp port 3306 BUT it is listening on tcp6 port 3306:
    This is the email I got from the system:
    /etc/cron.daily/logrotate:
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
    run-parts: /etc/cron.daily/logrotate exited with return code 1

    I was able to log on to with mysql -u root -pXXXXXPASSWD
    with no problems.

    But # netstat -ntlup | grep mysql
    tcp6 0 0 :::3306 :::* LISTEN 23626/mysqld

    When I take a look at /etc/mysql/mariadb.conf.d/50-server.cnf
    I do see port = 3306

    ps aux | grep mysql
    mysql 25863 0.0 2.1 691368 84468 ? Ssl 16:17 0:01 /usr/sbin/mysqld
    does not show a port

    iptables --line -vnL
    5 25075 2718K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306

    my system was recently installed with the perfect-server-debian-9-stretch-apache-bind-dovecot-ispconfig-3-1 tutorial
    mysql version: mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    ispconfig 3.1: ISPConfig Version: 3.1dev

    Any ideas?
    Any help would be appreciated.
    Ray
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The listen line is fine, this is not an indication that MySQL is listening on IPv6 only and the error message that the password is wrong backs this.

    Please test this:

    mysql -h localhost -u root -pXXXXXPASSWD

    does it still work with '-h localhost' ?
     
  3. LinuxPete

    LinuxPete Member HowtoForge Supporter

    Thanks Till,
    yes it does work with local host. I can connect w/o a problem.
    OK. If it is listening on 3306 what is causing the error I'm receive each time logrotate runs? As I got another this morning?
    Or am I missing something?
    Thanks
    Ray
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm not sure where exactly logrotate get's the root password from, maybe a wrong root password is stored in that place?
     

Share This Page