Forums
This topic is locked
Connecting to a MySQL database
Posted 07 Feb 2004 18:10:50
1
has voted
07 Feb 2004 18:10:50 robert Fuller posted:
Hi,I keep getting errors when i try to connect to a mysql database with dreamweaver.
If i dont set up a testing server, i just get an unidentified error has occurred message.
If i set up a testing server using FTP, then i get an error message sayng that the URL doent match with the url in the MM_connections (or something like that!) folder.
The problem i think i have is that the mysql database (i think) is on a different server than my pages.
I am using PHP and a mysql database.
If anyone can help then it would be much appreciated. Thanks
Replies
Replied 11 Feb 2004 13:58:24
11 Feb 2004 13:58:24 Greg Barkey replied:
I am having a similar problem, If I figure out what is up I will let you know. If you figure it out please post what you did.
I get a "no testing server" type message.
I get a "no testing server" type message.
Replied 12 Feb 2004 01:03:49
12 Feb 2004 01:03:49 Thomas Lindbjer replied:
A similar problem...
When trying to specify my localhost (apache on windows) mysqlconnection MX2004 simply will not accept it. I keep getting a message that "The testing server specified for this site does not match..." all ending up in the map "_mmServerScripts".
The first time I had this problem, I solved it by copying the map from it's root location on localhost.
but today, it simply doesn't work again. I can't specify a new mysqlconnection. and I can't read the one's specified yesterday. It simply won't contact MYSQL.
I can read phpscripts I created yesterday with an old connection. there mysql works all right. but new connections...??
Can anyone help??
Where do the map "_mmServerScripts" come from??
/0t20
When trying to specify my localhost (apache on windows) mysqlconnection MX2004 simply will not accept it. I keep getting a message that "The testing server specified for this site does not match..." all ending up in the map "_mmServerScripts".
The first time I had this problem, I solved it by copying the map from it's root location on localhost.
but today, it simply doesn't work again. I can't specify a new mysqlconnection. and I can't read the one's specified yesterday. It simply won't contact MYSQL.
I can read phpscripts I created yesterday with an old connection. there mysql works all right. but new connections...??
Can anyone help??
Where do the map "_mmServerScripts" come from??
/0t20
Replied 12 Feb 2004 03:03:53
12 Feb 2004 03:03:53 robert Fuller replied:
The _mmserver scripts are generated by dreamweaver itself, and are used to handle the database connections - i think its a script that it reuses to make each connection specified.
The way I have got round this problem is to code the PHP manually on each page that connects to a database.
the code i have used is:
// connect to server with these settings (just insert your own settings):
$db = mysql_connect("database server", "username", "password"
;
this connects to the databse, then i just use the rest of my PHP/MySQL code structure to return values from it.
Check out the PHP and MySQL manuals for more info, as my method will probably produce different results from which you require. Just search the net for PHP and MySQL examples, there are plenty out there.
Good luck.
Edited by - Rob_F on 12 Feb 2004 03:05:12
The way I have got round this problem is to code the PHP manually on each page that connects to a database.
the code i have used is:
// connect to server with these settings (just insert your own settings):
$db = mysql_connect("database server", "username", "password"

this connects to the databse, then i just use the rest of my PHP/MySQL code structure to return values from it.
Check out the PHP and MySQL manuals for more info, as my method will probably produce different results from which you require. Just search the net for PHP and MySQL examples, there are plenty out there.
Good luck.
Edited by - Rob_F on 12 Feb 2004 03:05:12
Replied 18 Feb 2004 02:03:59
18 Feb 2004 02:03:59 Andrew Rothwell replied:
This is a problem that I was having too
Take a look here - it may be of some help
www.dmxzone.com/forum/topic.asp?TOPIC_ID=27116&FORUM_ID=13&CAT_ID=5&Topic_Title=Connecting+to+a+remote+MYSQL+DB&Forum_Title=SQL
Andrew
Take a look here - it may be of some help
www.dmxzone.com/forum/topic.asp?TOPIC_ID=27116&FORUM_ID=13&CAT_ID=5&Topic_Title=Connecting+to+a+remote+MYSQL+DB&Forum_Title=SQL
Andrew
Replied 18 Feb 2004 16:53:33
18 Feb 2004 16:53:33 test aren replied:
www.macromedia.com/support/dreamweaver/ts/documents/unidentified_error_mysql.htm is a good place to get help with the connection.
I've had trobule with _mmServerScript when using both MX and MX2004.
The solution: Copy the files form the directory where the files originate. Dreamweaver MX 2004\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts on my computer.
Put it in th _mmServerScript in the root of your localhost.
I've had trobule with _mmServerScript when using both MX and MX2004.
The solution: Copy the files form the directory where the files originate. Dreamweaver MX 2004\Configuration\Connections\Scripts\PHP_MySQL\_mmDBScripts on my computer.
Put it in th _mmServerScript in the root of your localhost.