tcp : port

taaz
taaz used Ask the Experts™
on
I ran the command

#netstat -a |grep 3306
#
netstat -a |grep 8229
tcp         0         0 *:8229                                   *:*                                                       LISTEN


what does the above shows?  please quick reply be greatly greatly appreciated
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
this means that daemon listen gjhn 8229
to show about process name - run "netstat -nltp"

Commented:
this means that daemon listen port 8229
to show about process name - run "netstat -nltp"

Author

Commented:
So the port 8229 is available ?
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Commented:
some process is listen this port
so, if this port is not blocked with firewall - yes, port is available.

Author

Commented:
On the slave

SHOW SLAVE STATUS\G;

I am getting   Slave_IO_Running: No

I am running short of time need urgent help to this issue
Kerem ERSOYPresident

Commented:
Hi,

The first thing hre is your MySQL daemon is not listening to the port 3306. But some application is listening to the port 8229. If you want to know what application is listening to the port please issue the command and post the outpt here:

netstat -anpt | grep 8229

Cheers,
K.
No

The port is being used by something.
And it is listening on every ip address you have on your server, or computer.

Type
netstat -tunap

This will give you more information about which processes are using which ports.
Also you can try
lsof -c mysqld |grep -i TCP
root@mx2:~# lsof -c mysqld |grep TCP
mysqld    3376 mysql   13u  IPv4      14377                 TCP *:3306 (LISTEN)

Open in new window

or
lsof -i TCP:3306
root@mx2:~# lsof -i TCP:3306
COMMAND  PID  USER   FD   TYPE DEVICE SIZE NODE NAME
mysqld  3376 mysql   13u  IPv4  14377       TCP *:3306 (LISTEN)

Open in new window

Replacing with whichever port number you need

Author

Commented:
netstat -anpt | grep 8229
tcp       0      0  0.0.0.0:8229                                  0.0.0.0:*                      LISTEN                3167/mysqld

Author

Commented:
I ran the following on the slave  in the MYSQL MASTER/SLAVE
 
netstat -anpt | grep 8229
tcp       0      0  0.0.0.0:8229                                  0.0.0.0:*                      LISTEN                3167/mysqld

Author

Commented:
lsof -c mysqld |grep TCP   does give me
command not  found

lsof -i  TCP:3306    dos not run either
Kerem ERSOYPresident
Commented:
Ok it seems that your MySQL is set to listen the port 8229 instead of the default 3306. Now what you would like to do? Revert the port to 3306 or is it OK this way ?

If it is OK please check your firewall  and make sure it does not block the access if you need to access the port from another external server.

Cheers,
K.

Author

Commented:
Ok I will chang port to default 3306 on the master and will try

can you tell me how to check the firewall setting
the OS: Linux

Commented:
iptables-save
Kerem ERSOYPresident

Commented:
> Ok I will chang port to default 3306 on the master and will try

Do you need instructions on hosw to do this?

> can you tell me how to check the firewall setting
> the OS: Linux

What distro are you using ? I'll send you the specific instructions on how to make them permanent when you tell me what distro are you using ..

As a rule of thumb this will show the active rules:

iptables -L -n
Kerem ERSOYPresident

Commented:
It seems to me that probably somebody messed with the default settings in your /etc/services file to change the default port of mysql.

edit your /etc/services and find these lines:

mysql           8229/tcp                        # MySQL
mysql           8229/udp                        # MySQL

and make sure it reads:

mysql           3306/tcp                        # MySQL
mysql           3306/udp                        # MySQL

Save the file and restart your mysql daemon. Then it should start at port 3306 now..

Commented:
changing mysql port
http://www.cyberciti.biz/faq/change-default-mysql-port-under-linuxunix/

if you are connecting the sql server to internet using mysql on the default port w/o any firewall controll is not really a good idea.

Author

Commented:
on the master

cd /etc
cat services |grep mysql

mysql                 3306/tcp                          #MySQL
mysql                 3306/udp                         #MYSQL

On the Slave

cd /etc
cat services |grep mysql

mysql                 3306/tcp                          #MySQL
mysql                 3306/udp                         #MYSQL

 

Commented:
and what is indicated at the server file

/etc/my.cnf

port=3306  or port= 8229     ????

Author

Commented:
It is port 3306 on my.cnf  of both the servers (Master and Slave)


Commented:
mmhhh

restart mysql service

i.e.
sudo /etc/init.d/mysql restart


and then at the server

netstat -anpt | grep mysqld

post what you get

Author

Commented:
On the Master

netstat -anpt | grep mysqld

tcp                     0                   0  0.0.0.0:3306          0.0.0.0:*           LISTEN    2766/mysqld


on the slave

netstat -anpt | grep mysqld

tcp                     0                   0  0.0.0.0:3306          0.0.0.0:*           LISTEN    2781/mysqld

 

Commented:
well now the port changed to the default mysql port 3306  

try to connect the client to the server then...

Author

Commented:

I can open a new question for the error I am getting
Getting the error

from slave when I

show slave status\G;

i am getting

Slave_io_running: No
Commented:
well you already open the new question, probably you should close this incident...

Author

Commented:
I will just say Thank You to pmasotta,KeremE and Pilson66

you all are exceptional I am really thankful to you all.

I got the thing running after
Kerem ERSOYPresident

Commented:
you're welcome taaz.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial