MySQL running on 3306 port??
Posted by: Dan Boy (---.nhs.uk)
Date: February 01, 2013 03:28PM

Why does the port number in my.ini state port 3306 when I am running WAMP Server on port 1024?

Thanks Daniel.

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: stevenmartin99 (Moderator)
Date: February 01, 2013 03:32PM

your running apache on 1024 , but mysql is on 3306

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: Dan Boy (---.nhs.uk)
Date: February 01, 2013 03:37PM

That's what the files tell me. And if I type in localhost:1024 I get the WAMP server page but when I look at my.ini it says it's using port 3306. How can that be. If I change the port in my.ini to 1024 WAMP Server won't load?

Thanks Daniel.

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: stevenmartin99 (Moderator)
Date: February 01, 2013 03:51PM

no no no


your confused


APACHE AND MYSQL ARE DIFFERENT.

Apache hosts the webpages

Mysql is a db engine


config file for apache is httpd.conf where you will see 1024

config file for mysql is my.ini where you will see 3306


the standard is

apache on 80
mysql on 3306

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: RiggsFolly (---.as13285.net)
Date: February 01, 2013 04:00PM

Come on Daniel,


Apache and MySQL are 2 SEPERATE programs/services.

Apache has a config file called httpd.conf ( use the wamp menus to edit this )
MySQL has a config file called my.ini ( use the wamp menus to edit this )

Each config file tells one of these servers to listen on a specific port number. You cannot share port numbers. Once I have allocated port 80 its all mine. So normally that will be ( Apache - Listen 80 ), and MySQL ( Listen 3306 )

Apache Listens for request to deliver web pages to a browser on port 80 ( 1024 in your case )
MySQL Listens for request to query databases on port 3306



So you put an address into a browser....... The browser finds the server ( from the domain name ) and spits that request at PORT 80 ( normally ) on that servers ip address.

Apache is Listening on port 80 and received the request. But only if it comes in on that port ( 1024 in your case )

Apache gets the web page from its disk.

Apache sees some PHP code <?php .... ?> and passes that to the PHP interpreter for execution. ( not using any port numbers in this case )

PHP sees a mysql_connect() and connects to mysql via port 3306 ( remember they are seperate programs )

PHP and MySQL now communicate via TCPIP to send queries and receive results.

When the PHP script is complete it hand the modifiied web page back to Apache.

Apache then transmits whatever that web page looks like now back to the browser.


Commonly called a round trip.


I hope this clears up your confusion

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: Dan Boy (---.nhs.uk)
Date: February 05, 2013 11:46AM

Well, thank you guys. That helps me a lot, looks like I have a Wordpress problem then as it doesn't seem to like finding the database. Should I point wordpress to port 3306 to find the DB?

Thanks Daniel.

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: RiggsFolly (---.as13285.net)
Date: February 05, 2013 12:54PM

Daniel,

Assuming you have not changed any default port number or have put them back to how they should be.

Wordpress works best when you do a proper install ( 5 minute install ) documented on the wordpress site.

This will test the database connection you give it, and find the database you created before running the install, and give you useful error messages if anything is not right.

http://codex.wordpress.org/Installing_WordPress

Usually for a local install you would use 'localhost' and not a port number to locate the mysql server. The code will translate that and find the server automatically if it is on the default 3306.

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: Dan Boy (---.nhs.uk)
Date: February 05, 2013 03:45PM

There must be some additional configuration that is needed when using a port other then 80. I have it running on my PC (port 80) and it is fine but when I try to install it on the server running port 1024 it will not install.

Thanks Daniel.

Options: ReplyQuote
Re: MySQL running on 3306 port??
Posted by: RiggsFolly (---.as13285.net)
Date: February 05, 2013 04:49PM

Dan,

What actually wont install.

Do you mean that the install itself fails or something else?

Options: ReplyQuote


Sorry, only registered users may post in this forum.