943,073 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 299
  • MySQL RSS
Jul 29th, 2010
0

mySQL and Dreamweaver CS3

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjs319 is offline Offline
5 posts
since Jul 2010
Jul 30th, 2010
0
Re: mySQL and Dreamweaver CS3
Click to Expand / Collapse  Quote originally posted by jjs319 ...
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.
Reputation Points: 19
Solved Threads: 56
Posting Pro
teedoff is offline Offline
560 posts
since Jul 2010
Jul 31st, 2010
0
Re: mySQL and Dreamweaver CS3
I think you need to domain name without it you would not upload your website.I am not sure about it.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
aman007 is offline Offline
15 posts
since Jul 2010
Aug 1st, 2010
0
Re: mySQL and Dreamweaver CS3
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.
Reputation Points: 76
Solved Threads: 77
Posting Pro in Training
drjohn is offline Offline
422 posts
since Mar 2010
Aug 3rd, 2010
0
Re: mySQL and Dreamweaver CS3
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjs319 is offline Offline
5 posts
since Jul 2010
Aug 3rd, 2010
0
Re: mySQL and Dreamweaver CS3
PS. The iPower rep showed me how to import my database files into the mysql on iPower, so the database setups are the same.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjs319 is offline Offline
5 posts
since Jul 2010
Aug 4th, 2010
0
Re: mySQL and Dreamweaver CS3
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:
MySQL Syntax (Toggle Plain Text)
  1. # FileName="Connection_php_mysql.htm"
  2. # Type="MYSQL"
  3. # HTTP="true"
  4. $hostname_con_forum = "localhost";
  5. $database_con_forum = "dtabase_name";
  6. $username_con_forum = "username";
  7. $password_con_forum = "password";
  8. $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.
Last edited by HansK; Aug 4th, 2010 at 8:22 am.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
HansK is offline Offline
4 posts
since Aug 2010
Aug 7th, 2010
0
Re: mySQL and Dreamweaver CS3
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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjs319 is offline Offline
5 posts
since Jul 2010

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Totals from query
Next Thread in MySQL Forum Timeline: Account Information Page mySQL Dreamweaver





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC