Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005

    listening inet port problem

    I have installed SQLRelay on Redhat Linux 9 platform to connect to MySQL Database.

    They have given sqlrelay.config file to configure the MySQL Server using port, socket

    I gave the port as 3306 in the config file, which is using by MySQL server.

    If i try to start the process i am getting the following error.
    [root@Shilpa root]# sqlr-start -id mysqlcon
    Starting listener:
    sqlr-listener -id mysqlcon -config /etc/sqlrelay.conf
    Could not listen on inet port: 3306
    Make sure that no other processes are listening on that port.

    sqlr-listener failed to start.


    Is there any command which will tell the port number and the process running on it?

    If someone knows please let me know.

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    SE, Stockholm
    netstat -nap | grep ':3306'
    Should give you something like this
    tcp        0      0  *               LISTEN      2397/
    Which means that PID 2397 is using TCP:3306
    ps xav|grep 2397|grep -v grep
    whould reply in something like
    2397 ?        S      0:01  17620  1764 16607   40  0.0 [mysqld]
    And from above I do know for fact that it is "mysqld" that has started to listen on my TCP:3306

    Might be some easier way to do it, however, this works on most Unx like systems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts