Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DB connection and port 81

Guest
Nov 15, 2007 Nov 15, 2007
This question is based on an early one ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid=1314920&e...

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.
TOPICS
Server side applications
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 15, 2007 Nov 15, 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.

Translate
LEGEND ,
Nov 15, 2007 Nov 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.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 15, 2007 Nov 15, 2007
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.

Thanks for your effort, but you restated the problem without addressing my problem. I'll restate it using your words if it will help:

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. However on my production (Web Host's) system, I must specify LOCALHOST without the qualifying 3306 for MySQL. Is this true? If so, I have to make the change on my production system which is not an acceptable approach.

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?

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2007 Nov 15, 2007


"Minding" <george@minding.org> wrote in message
news:fhibo0$4ks$1@forums.macromedia.com...
> 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.
>
> Thanks for your effort, but you restated the problem without addressing my
> problem. I'll restate it using your words if it will help:
>
> 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. However on my production (Web
> Host's) system, I must specify LOCALHOST without the qualifying 3306 for
> MySQL.
> Is this true?

I don't know if your host runs MySQL on another port and specified that in
the defaults somewhere,
did they tell you that?

> If so, I have to make the change on my production system which
> is not an acceptable approach.
>
> 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.

You want to set it as the default port for... what?
As you stated your apache is already listening to port 81, unless you unbind
your IIS from that port you can't run apache on the default HTTP port : 80

> Or is there some other approach?

> Thanks.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2007 Nov 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 15, 2007 Nov 15, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2007 Nov 16, 2007
Minding wrote:
> I don't need clarification for what I understand. I need clarification for
> what I don't understand.

What you understand and what you *think* you understand may be two
different things.

> 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.

Good luck.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2007 Nov 16, 2007
LATEST
.oO(Minding)

> 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.

I don't see the problem actually. You have two different web servers,
listening on two different ports. Additionally there's MySQL, bound to
its default port 3306. Nothing special so far.

It was already suggested multiple times to omit the port when connecting
to the MySQL server, 'localhost' is enough. Whenever a URL is requested
without a port, the default port for the requested service is used. If a
browser connects to 'localhost', it will be port 80. If a MySQL client
connects to 'localhost', it will be 3306. A normal FTP connection to
'localhost' will use 20/21 and so on.

So in most cases you don't have to worry about ports at all. Even your
setup with the two web servers shouldn't affect any other services like
MySQL. They are entirely different things.

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

For a standard installation of MySQL these two URLs

mysql://localhost
mysql://localhost:3306

have absolutely the same meaning.

> 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.

Default port for what? Every service has its own default port. Of course
they can be changed (you already changed Apaches default port to 81),
but usually that's not necessary.

Micha
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines