Jump to content

Archived

This topic is now archived and is closed to further replies.

booga1138

cannot connect to mysql in dreamweaver

Recommended Posts

i dont know if this is mysql or dreamweaver but i get an error everytime i try to connect to mysql. the error is vague, \"an unidentifed error has occured\". i found a tech note on mm site and followed it multiple times but it has not fixed the problem.

 

i am running apache 2.0.47

PHP 5 Beta 1

MySQL 4.1

 

on the same machine as i\'m using dreamweaver

 

i enter

 

connection name: mb

mysql server: localhost

username: root

password:

database:

 

i hit select to select the database and that is when i get the error.

Share this post


Link to post
Share on other sites

I had a very similar problem. Do you have any tables created in your database yet? Dreamweaver seems to like to report errors when connecting to a completely unpopulated database....

Share this post


Link to post
Share on other sites

the problem was erradicated when i reinstalled apache, mysql, php 4ish using foxserv to do it. foxserv installes them all at once. i know now it wasnt dmx because as soon as it was installed (and tweaked a bit) it worked and connected. to answer your question it doesnt matter if there are tables or not (well yes i suppose) but the default mysql install comes with test and mysql databases. i was connected to test.

thanks

j[/i]

Share this post


Link to post
Share on other sites

I\'m having the exact problem, only I am not using dreamweaver on the server. The server is about 5 feet away from me, however. I\'m using IIS and everything but dreamweaver runs just perfectly with it. I tried reinstalling MySQL, and PHP, but to no avail. Anyone else have any suggestions?

Share this post


Link to post
Share on other sites

do a search for foxserv. it is a free download install program that will install everything you need. first uninstall everything. then install foxserv. when you install everything separately you have to a lot of tweaking. so get foxserv and install to the default locations. restart - then test each one. mysql needs a admin account so you must read the mysql docs if that still doesn\'t work. my control center from mysql.com (i think). when installing mysql it will ask for a name and password. write that down. you will use that when hooking up through dmx. test dmx with that username and password and the test database. use any name for your connection.

 

about foxserv - these aren\'t the absolute newest versions but so what. i spent 5 days- i\'m not kidding - trying to get this installed reading online manual after manual. read the mysql manual. there is a crappy one out there and there is a good one. if you find two the good one is easy to read. it helps you quickstart and get a move on.

 

the best option after you install everything is to get the book dreamweaver mx php web development by glasshaus ltd. it will guide you step by step through everything and has been a tremendous resource for both install and dmx.

 

later and good luck (praying is better than luck though)

judah

Share this post


Link to post
Share on other sites

But what if I don\'t want Apache? Can I get rid of apache after foxserv installs? I don\'t want to play with it until I am sure of what it\'s going to do to this thing. I\'m running IIS 6 with some sites using C# so I can\'t really use apache.

Share this post


Link to post
Share on other sites

you can get rid of it after it installs. i believe you can install it along side iis as well. i have done that with previous versions of iis. all it does is install an apache service. if you dont want it to run or even exist as far as windows is concerned then go into the services manager and set it to manual. then it will never run unless you specifically start it.

Share this post


Link to post
Share on other sites

I tried foxserv, but I still cant connect to my db from dw. Same \"unidentified error..\" message.

If I\'m not going to be able to get dw to play nice, what would I have to write, in PHP, to get a connection to a mysql database on the same machine?

Share this post


Link to post
Share on other sites

i dont know. i would contact macromedia techsupport. or else go out and get that book i recommended.

Share this post


Link to post
Share on other sites

The book \"dreamweaver mx php web development\" by glasshaus ltd is now published by Wiley. According to my source Glasshaus went out of business and have stopped publishing. I do have the Glasshaus book and agree that it is very good.

Share this post


Link to post
Share on other sites

I\'ve now managed to get a list of databases to show up. My problem was in the MMHTTPDB.php script that DWMX uses to to access the database.

 

At the top of the file is the line

if(extension_loaded(\"mbstring\"))

{

 

and I had the load extension statement commented out in my php.ini. It should be like this i.e without a \';\' at the front.

 

extension=php_mbstring.dll

 

:D

Share this post


Link to post
Share on other sites
I've now managed to get a list of databases to show up. My problem was in the MMHTTPDB.php script that DWMX uses to to access the database.

 

At the top of the file is the line

if(extension_loaded("mbstring"))

{

 

and I had the load extension statement commented out in my php.ini. It should be like this i.e without a ';' at the front.

 

extension=php_mbstring.dll

 

:D

My environment:

PHP 4.3.4+MySQL 4.0.18+Apache 2.0.49+Dreamweaver MX 2004 v7.0

 

In Dreamweaver MX

1.I name my website "vote",and Next

2.I'm using "PHP+MYSQL" technology,and Next

3.I choosed "edit local and test local" option 1 or Alt+E

Stored into "C:\Apache2\htdocs\vote\",and Next

4.Input "http://localhost/vote/" and test url successfully,and Next

5.I choosed yes to using remote server,and Next

6.I choose "Local/Network" and Stored into "C:\Apache2\htdocs\vote\" and Alt+S (Auto fresh remote file list),and Next

7.I clicked Alt+N,and Next

8.and Next then finished.

 

After that, I added MySQL Connection and input correct value for server(localhost) username(root) password(root), but when I clicked choose database, the error display

with "http://localhost/vote/_mmServerScripts/MMHTTPDB.php"

 

I have followed to activated the extension=php_mbstring.dll in php.ini.

 

Thanks for your great help in advance!

Share this post


Link to post
Share on other sites

DMX and DMX2004 are touchy when it comes to the version of PHP you are using. I also had the same problem for about a week. Couldn't connect to the database, unidentified error, and on and on. I finally said screw it and reinstalled from scratch. Tried DSNLess connections and so on. It boils down to this: The scripts automated by DMX2004 do not work with PHP5. DMX2004 also has errors with PHP 4.3.4. This is what I am running, and it is running perfect. No problems:

Apache 2.0.49

MySQL 4.0.18

PHP 4.3.6

DMX2004

 

I have a test computer at home running Win XP Pro and at work a test server with 2000 Pro and a production server running NT4. All with the same environment. Hope that helps some.

 

Share this post


Link to post
Share on other sites

I have spend hours on this stupid problem, tried out all different combinations of different versions of PHP and MySql.

 

Here is the one that finally worked for me

PHP 4.3.8 + MySQL 4.021 + Dreamweaver MX 2004 version 7.0.1

 

Note: I suspect PHP 5.0.1 will not work with DW 2004

 

Note again, if you are still using DW MX, you need an update from Macromedia.

Please refer this article: http://www.macromedia.com/support/dreamwea...error_mysql.htm

Share this post


Link to post
Share on other sites

;) I encounter the same unidentified errror when Dreamweaver mx 2004 connect to mysql. Configuration :

 

1) Apache 2.0.5

2) php 5.0.1

3) mysql 4.0.2

4) phpmyadmin 2.5.7

 

Re-install php to version 4.3.8 resolve the problem.

 

Tried to use mysql 4.1 but I guess DBManager cannot support this version.

 

Share this post


Link to post
Share on other sites

after installing php try to copy extensions folder from your master installer to php directory on your computer and then edit php.ini (locate in windows directory) locate that extension folder on this file. i try this and it works.

in some cases dreamweaver always use "mysql_fetch_assoc" to display the data from the database. but that syntax is not recognize by php or mysql. then try to upgrade your php or mysql with the latest version.

im using IIS 4,DMW MX 2004,PHP 4.3 and MYSQL 4

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.