glitchgirl
11-14-2006, 01:27 PM
Hey ya'll. I'm having difficulty connecting to my Mysql database that is on my Yahoo! Account. Its driving me nuts, because it would be so easier to grab than code especially with the extensive things i need to do.
Okay so here's what's going on.
I add a connect to the mysql database.
&& This dialog pops up wanting the following information
Connection Name: Which would be "IdentityGroup"
MySql Server <-- I'm pretty sure I'm doing this wrong. I connect as mysql which is what Yahoo! wants me to do. (i've tried localhost doesn't work, is there an ip address anywhere on the CPanel?)
Username & Password - Yeah these are obvious
Database which I can choose "select" but it can't connect to the database because I"m guessing the MySql server is all wrong.
Here's the code that Yahoo! gives that would be involved in the connection file that dreamweaver automatically sets up.
<?php
$link = mysql_connect("mysql", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE");
$query = "SELECT * FROM TABLE";
$result = mysql_query($query);
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "$value\n";
}
}
mysql_close($link);
?>
However of course, dreamweaver writes this a different way. This is just an example of what Yahoo! wants.
Here is a photo of what I'm talking about for those of you who are like "waahh?" Dialog Box for MySql Connection Setup (http://www.jswick.com/troubleshootdwr8.html)
Okay so here's what's going on.
I add a connect to the mysql database.
&& This dialog pops up wanting the following information
Connection Name: Which would be "IdentityGroup"
MySql Server <-- I'm pretty sure I'm doing this wrong. I connect as mysql which is what Yahoo! wants me to do. (i've tried localhost doesn't work, is there an ip address anywhere on the CPanel?)
Username & Password - Yeah these are obvious
Database which I can choose "select" but it can't connect to the database because I"m guessing the MySql server is all wrong.
Here's the code that Yahoo! gives that would be involved in the connection file that dreamweaver automatically sets up.
<?php
$link = mysql_connect("mysql", "USERNAME", "PASSWORD");
mysql_select_db("DATABASE");
$query = "SELECT * FROM TABLE";
$result = mysql_query($query);
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "$value\n";
}
}
mysql_close($link);
?>
However of course, dreamweaver writes this a different way. This is just an example of what Yahoo! wants.
Here is a photo of what I'm talking about for those of you who are like "waahh?" Dialog Box for MySql Connection Setup (http://www.jswick.com/troubleshootdwr8.html)