[Solved] Another mysqld server running on port: 3306

MySQL service may start throwing errors as below while starting/restarting the MySQL service on a Linux server

[ERROR] Can't start server: Bind on TCP/IP port: Address already in use
[ERROR] Do you already have another mysqld server running on port: 3306 ?
[ERROR] Aborting

Looking at the error, it seems to be an issue with the MySQL port 3306.

Solution 1:

Check if MySQL service is stopped, if not stop the service

/etc/init.d/mysqld status

Check if MySQL service port 3306 is still in use or not

netstat -apn | grep 3306

If port is still in use then kill the process using the port 3306

kill -9 pid

Start the MySQL service.

/etc/init.d/mysqld start

Solution 2:

Check the bind address in the MySQL configuration file /etc/my.cnf
Set is as per the requirement (mostly localhost / 127.0.0.1) or you may comment the bind-address field.

Start the MySQL service

/etc/init.d/mysqld start

Hope this helps!

Share on Facebook3Share on Google+0Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn2Share on Tumblr0Pin on Pinterest0Email this to someonePrint this page

About Abhijit Sandhan

Abhijit Sandhan

Loves Linux, Blogging, Traveling, Hiking and sharing Knowledge!

One comment

  1. I am facing issue during replication implementation but not got solution:

    2017-09-24 13:53:07 22618 [Note] Plugin 'FEDERATED' is disabled.
    2017-09-24 13:53:07 22618 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2017-09-24 13:53:07 22618 [Note] InnoDB: The InnoDB memory heap is disabled
    2017-09-24 13:53:07 22618 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2017-09-24 13:53:07 22618 [Note] InnoDB: Memory barrier is not used
    2017-09-24 13:53:07 22618 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2017-09-24 13:53:07 22618 [Note] InnoDB: Using Linux native AIO
    2017-09-24 13:53:07 22618 [Note] InnoDB: Using CPU crc32 instructions
    2017-09-24 13:53:07 22618 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2017-09-24 13:53:07 22618 [Note] InnoDB: Completed initialization of buffer pool
    2017-09-24 13:53:07 22618 [Note] InnoDB: Highest supported file format is Barracuda.
    2017-09-24 13:53:07 22618 [Note] InnoDB: 128 rollback segment(s) are active.
    2017-09-24 13:53:07 22618 [Note] InnoDB: Waiting for purge to start
    2017-09-24 13:53:07 22618 [Note] InnoDB: 5.6.37 started; log sequence number 1626223
    2017-09-24 13:53:07 22618 [Note] Server hostname (bind-address): '*'; port: 3306
    2017-09-24 13:53:07 22618 [Note] IPv6 is available.
    2017-09-24 13:53:07 22618 [Note] - '::' resolves to '::';
    2017-09-24 13:53:07 22618 [Note] Server socket created on IP: '::'.
    2017-09-24 13:53:07 22618 [ERROR] Can't start server : Bind on unix socket: Address already in use
    2017-09-24 13:53:07 22618 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?

Leave a Reply

Your email address will not be published. Required fields are marked *