Skip to main content
November 15, 2007
Answered

DB connection and port 81

  • November 15, 2007
  • 1 reply
  • 1045 views
This question is based on an early one ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid=1314920&enterthread=y).

Because I have SQL Server on port 80 and have my WAMP running on port 81, I have had to specify my MySQL Server as LOCALHOST:3306 on my local system in order to establish my database connection. However it must be LOCALHOST at my Web Host's system. Since I can't establish a LOCALHOST connection locally, I have to set it remotely (after uploading my files.)

I'm wondering if it's possible to set port 81 as the default port on my system and if so, what are the drawabacks of doing this.

Or is there some other approach?

Or am I missing something here and making things more complicated than they are?

Thanks.
This topic has been closed for replies.
Correct answer
You two need some fresh air.

I don't need clarification for what I understand. I need clarification for what I don't understand. I don't need assistance for what works. I need assistance for what doesn't work.

If specifying localhost had worked initially, I wouldn't have started this post.

I take it either the default post can't be changed or you don't know how to do it either. I'll check over at MS.

1 reply

Inspiring
November 15, 2007
"Minding" <george@minding.org> wrote in message
news:fhhl6q$4r6$1@forums.macromedia.com...
> This question is based on an early one
> ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=2
> 63&threadid=1314920&enterthread=y).

You are very confused here
> Because I have SQL Server on port 80

I think you mean IIS

>and have my WAMP running on port 81,
that would be APACHE

> I have had to specify my MySQL Server as LOCALHOST:3306 on my local system
> in
> order to establish my database connection.

That is the default port for the MySQL server

> However it must be LOCALHOST at my Web Host's system.

LOCALHOST is an alias that should point to the 127.0.0.1 address which
always points to the local host.
In other words: localhost means this computer
This will be THAT computer on each different computer where localhost is
referred.

> Since I can't establish a LOCALHOST connection locally,

So you can't connect to YOUR localhost or to your webhosts localhost?

> I have to set it remotely (after uploading my files.)
>
> I'm wondering if it's possible to set port 81 as the default port on my
> system
> and if so, what are the drawabacks of doing this.

Default port for your system? If you have IIS running on port 80 you have to
bind Apache to another port yes, 81 is usually chosen for this purpose,
you specify the port in apache's configuration file
> Or is there some other approach?

You don't need a local WAMP if you want to develop on your IIS server, but
usually you develop the whole system on YOUR local system, then "freeze" the
system and deploy it to THEIR production environment.

> Or am I missing something here and making things more complicated than
> they
> are?

Although you can do development on a production system with Dreamweaver, it's
prone to (security) problems,
off course if your development environment is very different from your
production environment you might have problems in the deployment phase

> Thanks.


Inspiring
November 15, 2007
Minding wrote:
> Not confused about IIS and Apache. Not confused about what Localhost is on
> this or another computer. Not confused about default ports and binding to 81.
> Not confused about doing development on a production system with DW.

If you're not confused, why the questions?

> Because I have IIS on port 80 and have Apache running on port 81, I have had
> to specify my MySQL Server as LOCALHOST:3306 in DW when on my local system in
> order to establish my database connection.

Sorry to contradict you, but you are confused. Originally, you said you
have SQL server running on port 80. Now you say you have IIS on port 80
- which makes more sense. Port 80 is for web servers. IIS is a web
server. SQL server is a relational database server that runs by default
on port 1433.

However, there is no need to specify MySQL as being on port 3306, as
that is the default port for MySQL. When specifying the server for MySQL
in a Dreamweaver connection, all that's necessary is localhost. Your
earlier attempt to specify localhost:81 was attempting to connect to
Apache. Although you are using Apache to serve your web pages,
connections to MySQL are made directly. The only time you need to
specify a different port for MySQL is if you are running the MySQL
server on a non-standard port such as 3307 or 8889.

> However on my production (Web
> Host's) system, I must specify LOCALHOST without the qualifying 3306 for MySQL.
> Is this true?

If your host runs MySQL on the standard port (3306), you can use either
localhost or localhost:3306.

> If so, I have to make the change on my production system which
> is not an acceptable approach.

The choice is being made by you. The standard port for all web servers
is 80, but you can run only one server at a time on the same port. If
you want to run IIS and Apache simultaneously on your local machine, you
have no alternative but to run one on 80 and the other on a non-standard
port. You can, of course, run them both on port 80, but not at the same
time.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Correct answer
November 16, 2007
You two need some fresh air.

I don't need clarification for what I understand. I need clarification for what I don't understand. I don't need assistance for what works. I need assistance for what doesn't work.

If specifying localhost had worked initially, I wouldn't have started this post.

I take it either the default post can't be changed or you don't know how to do it either. I'll check over at MS.