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

MySQL Error# : 2002 in Dreamweaver CS3

New Here ,
Jul 29, 2008 Jul 29, 2008
I created a database in PHPMyAdmin for my site and when I try to connect to the DB from Dreamweaver I receive the error message # 2002

"Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'(s)"

Does anyone have any idea how to fix that problem? I was able to get it works before but since I reformat my harddrive I keep getting this error message.

Can anyone help me please? I'm running Win XP Pro SP2
TOPICS
Server side applications
3.0K
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

New Here , Oct 06, 2008 Oct 06, 2008
I was having the exact same problem. I recently discovered a change I made to the dns server local to my testing server was the culprit.

Dreamweaver CS4 beta, CS3 on Mac OS X & Windows Vista

Server= MAMP running on Mac OS X Leopard
Translate
LEGEND ,
Jul 29, 2008 Jul 29, 2008
chunkeung wrote:
> "Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock'(s)"

That's a message that should appear only on a Mac or Linux.

> Can anyone help me please? I'm running Win XP Pro SP2

If you're running XP and using a local testing environment, something is
seriously wrong. Your setup seems to have an OS identity problem.

--
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
New Here ,
Jul 29, 2008 Jul 29, 2008
ok now another message came up
HTTP Error Code 404 file not found.

1) there's no testing server running on the server machine
2) the testing server specified for this site does not map to the http://mysite.com/public_html/_mmServerScripts/MMHTTPDB.php url. Verify that the URL prefix maps to the root of the site.


the _mmServerScripts/MMHTTPDB.php is on the server as well as in my local machine. What is the problem? It had worked previously. I really don't understand. Can someone help me please??
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 ,
Jul 30, 2008 Jul 30, 2008
chunkeung wrote:
> 2) the testing server specified for this site does not map to the
> http://mysite.com/public_html/_mmServerScripts/MMHTTPDB.php url. Verify that
> the URL prefix maps to the root of the site.

The URL prefix in the testing server definition should be this:

http://mysite.com/

NOT this:

http://mysite.com/public_html/

--
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
New Here ,
Jul 30, 2008 Jul 30, 2008
ok this works now, thanks

but this error # 2002 is still bugging me. I noticed this though.

As I am hosting 2 sites at different hosting server. I tried to connect to my MySQL database in the other site and it works fine. When I login into PHPMyAdmin I see that the Server is "Localhost via UNIX socket" so I put that into my setting in dreamweaver for the "MySQL server" but on the hosting that giving me that #2002 error message their Server is "127.0.0.1 via TCP/IP" and I tried to put in 127.0.0.1 instead of localhost but it still doesn't work and gives me this error message. I have asked them to upgrade me to php version 5, do you think this will help solve the issue? or is it because it is hosting in a windows server?
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 ,
Jul 30, 2008 Jul 30, 2008
chunkeung wrote:
> When I login into
> PHPMyAdmin I see that the Server is "Localhost via UNIX socket" so I put that
> into my setting in dreamweaver for the "MySQL server" but on the hosting that
> giving me that #2002 error message their Server is "127.0.0.1 via TCP/IP" and I
> tried to put in 127.0.0.1 instead of localhost but it still doesn't work and
> gives me this error message.

localhost and 127.0.0.1 are the same thing. All you need is "localhost"
or "127.0.0.1" (without the quotes). The "via UNIX socket" and "via
TCP/IP" are simply descriptions of the type of connection. They are NOT
part of the server address.

--
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
New Here ,
Jul 31, 2008 Jul 31, 2008
I thought they were the same thing too but then what can explain on the server where it says "localhost" my connection can be made successfully but the hosting server that says "127.0.0.1 via TCP/IP" is not working and keeps giving me that error message #2002?
I have asked them (the hosting that doesn't work) to upgrade my plan to PHP 5, would that make a difference?
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
New Here ,
Jul 31, 2008 Jul 31, 2008
Maybe to give you a better idea of what I mean please see this print screen http://www.ta-design.net/images/localhost.jpg
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 ,
Jul 31, 2008 Jul 31, 2008
chunkeung wrote:
> Maybe to give you a better idea of what I mean please see this print screen http://www.ta-design.net/images/localhost.jpg

The one that's not connecting correctly is using 127.0.0.1:3306. The
colon followed by 3306 indicates the port number. 3306 is the default
port for MySQL, so localhost should work, but I would suggest using
127.0.0.1:3306 in the MySQL Server field.

--
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
New Here ,
Jul 31, 2008 Jul 31, 2008
Yes I tried putting 127.0.0.1:3306 in the MySQL Server field but it gives me the error message #2013 "Lost connection to MySQL server during query"
I really don't know what happened here. I tried to open port 3306 on my firewall with hope that it will work but it doesn't :(
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
New Here ,
Sep 09, 2008 Sep 09, 2008
Hey I am having the same problem! Have you resolved it? Ive been searching for an answer everywhere
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
New Here ,
Oct 06, 2008 Oct 06, 2008
LATEST
I was having the exact same problem. I recently discovered a change I made to the dns server local to my testing server was the culprit.

Dreamweaver CS4 beta, CS3 on Mac OS X & Windows Vista

Server= MAMP running on Mac OS X Leopard
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