0

I have created a website in Dreamweaver CS3 that includes mySQL databases. I have been using xampp, and have a test server running on my local machine. Everything seems to be working fine, and now would like to put the website online. I'm not sure how exactly to do that. I can't seem to get my hosts mySQL (iPower) linked to my dreamweaver, and am not even sure if that's what I need to do. I have all of the database connections in my website linked to the databases on my local machine. How do I get the databases to iPower without losing the connections to my Dreamweaver pages? I've tried inputting the dreamweaver mySQL information into the mySQL connection dialog box, but it cannot find the server.

I know this is a bit of a garbled mess, but does anyone have an idea as to what I'm talking about and could help me?

Thanks much!
Jason

5
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by jjs319
0

I have created a website in Dreamweaver CS3 that includes mySQL databases. I have been using xampp, and have a test server running on my local machine. Everything seems to be working fine, and now would like to put the website online. I'm not sure how exactly to do that. I can't seem to get my hosts mySQL (iPower) linked to my dreamweaver, and am not even sure if that's what I need to do. I have all of the database connections in my website linked to the databases on my local machine. How do I get the databases to iPower without losing the connections to my Dreamweaver pages? I've tried inputting the dreamweaver mySQL information into the mySQL connection dialog box, but it cannot find the server.

I know this is a bit of a garbled mess, but does anyone have an idea as to what I'm talking about and could help me?

Thanks much!
Jason

Not exactly sure I'm following you, but I use DW and MySQL as well. But I use Navicat which connects to my host site and when I add or update my db, its automatically backed-up on my host site as well. Im new to this as well, so not sure if this helps you.

0

I think you need to domain name without it you would not upload your website.I am not sure about it.

0

Normally you will have one file which holds the connection details for the database (host, database name, username, password). This should be present as an include file. So you just change the appropriate bits of that file to match what the online provider has given you. (I keep one copy called local-filename.php and another called remote-filename.php and copy these over the filename.php when working on the local or remote version, rather than type the details in by hand each time I switch from working online and local.)

To get the actual tables and data online, you use your local copy of phpmyadmin or whatever other program you are using to look at the local database to make an extract of the table definitions and the data. Then you copy that and paste it into the equivalent program you use to look at the online database and execute the extract. The extract is actually an sql query to build the tables and to insert the data.

0

I figured out what the main issue was. iPower does not allow remote connections to their mySQL for security reasons. This is probably good, as its more secure, but my goodness is it quite the headache. I have tried updating the connection information in the connection file, but that hasn't worked either. I talked with an iPower support technician, but didn't have much luck at all. They supplied me with a code snippet that was supposed to make all of my connections move to the iPower database. I input the code and still am having issues connecting to their database. Even with this code, I'm not sure how the specific connections from the database to text fields (account information, login username and password, etc.) would respond. Will they acknowledge the database switch, and change where they're recording the data, or is there something in Dreamweaver I'm going to have to do to update those connections?

Code Snippet (minus username and password for security reasons):
<?php
$link = mysql_connect('syde0004.ipowermysql.com', 'username', '*password*');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(account_setup);
?>

Again, any help would be incredibly appreciated. I'm new to this and seem to be hitting every bump in the road!

Thanks again,
Jason

0

PS. The iPower rep showed me how to import my database files into the mysql on iPower, so the database setups are the same.

0

On your local setup, there is a folder "Connections" and a file in there with the name of your DB connection. This file needs to be changed to be the same as the remote server so it should look like this:

# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_con_forum = "localhost";
$database_con_forum = "dtabase_name";
$username_con_forum = "username";
$password_con_forum = "password";
$con_forum = mysql_pconnect($hostname_con_forum, $username_con_forum, $password_con_forum) or trigger_error(mysql_error(),E_USER_ERROR);

You just need to change the information and connection name to match that of your site. I usually have the remote and local settings in the same file, I just comment out the lines that don't apply for each location, so I have all the info together in the same place.

Edited by HansK: n/a

0

Thank you guys so much for the help! I was able to figure it out based off of what you guys told me. It's a bit daunting trying to build a website as a beginner with all of these issues always popping up! All you can do is keep learning! Thanks again!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.