Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 21, 2012, 04:31:20 AM

Pages: [1]   Go Down
  Print  
Author Topic: Dreamweaver to MySQL connection failure  (Read 2108 times)
tharring
Newbie
*
Offline Offline

Posts: 4


« on: August 10, 2007, 10:15:25 AM »

Here we go again--another question about connecting using Dreamweaver to a working Mysql database on a linux server.

I've tried adding the % (any remote ip), and am sure I'm using the correct user_username and user_password and user_databasename; I'm using a Connections file connection--do I also need to use a "script" to connect? I don't think so. I think that's what the Connections file is all about. So it's set up properly in Dreamweaver, but on lunarpages, I get the error:

'I cannot connect to the database because: ' . mysql_error());
        mysql_select_db ("user_contacts");

Any help would really be appreciated. Support won't help me.
Thanks,
Tedra
Logged
tharring
Newbie
*
Offline Offline

Posts: 4


« Reply #1 on: August 11, 2007, 09:12:20 AM »

Here we go again--another question about connecting a .php Connections page in Dreamweaver to a working Mysql database on a linux server. Support won't help me so I hope someone here in the forum will.

I'm using OSX 10.4.10 and Dreamweaver 8.

I've tried adding the % (any remote ip), or localhost, and am sure I'm using the correct user_username and user_password and user_database, but on lunarpages, I get the error:

'I cannot connect to the database because: ' . mysql_error());
        mysql_select_db ("user_contacts");

I've seen this question a lot and would appreciate having someone who's solved this already give me some direction as to what I need to do to get the database talking to the Connections page.

Thanks,
Tedra
Logged
tharring
Newbie
*
Offline Offline

Posts: 4


« Reply #2 on: August 12, 2007, 07:25:32 PM »

Nobody responded to my question, but with a little inside help, I did finally get the answer to my  question. If anyone else is having trouble with this, here's what you do:

Don't use the prepended identifier (the 5-character plus underscore domain name identifier that's added when you create a database and user) with your password. Let's say the prepended name is cinem2_ (for domain name cinema.com). Set your username to cinem2_annie, set your database to cinem2_movies, but set your password to simply openup. Don't set it up as cinem2_openup. Isn't that easy. Why has this been so hard to explain? It isn't.

The other option is to use your cpanel username as it is (without the prepended identifier and underscore) and the cpanel password (again, without the prepended identifier). The only thing is, that's the same thing as using root username and password into your databases, and you may want to have individual users and individual accesses to your databases. That's why you'd use the first option.

You'll also need to set up your mysql databases on your own computer (as your testing computer) to  database name cinem2_movies, and username cinem2_annie. OR database name (cpanel name) and username (cpanel username).

Hope that helps everyone with this problem!
Best wishes,
Tedra
Logged
tharring
Newbie
*
Offline Offline

Posts: 4


« Reply #3 on: August 12, 2007, 07:26:41 PM »

Nobody responded to my question, but with a little inside help, I did finally get the answer to my  question. If anyone else is having trouble with this, here's what you do:

Don't use the prepended identifier (the 5-character plus underscore domain name identifier that's added when you create a database and user) with your password. Let's say the prepended name is cinem2_ (for domain name cinema.com). Set your username to cinem2_annie, set your database to cinem2_movies, but set your password to simply openup. Don't set it up as cinem2_openup. Isn't that easy. Why has this been so hard to explain? It isn't.

The other option is to use your cpanel username as it is (without the prepended identifier and underscore) and the cpanel password (again, without the prepended identifier). The only thing is, that's the same thing as using root username and password into your databases, and you may want to have individual users and individual accesses to your databases. That's why you'd use the first option.

You'll also need to set up your mysql databases on your own computer (as your testing computer) to  database name cinem2_movies, and username cinem2_annie. OR database name (cpanel name) and username (cpanel username).

Hope that helps everyone with this problem!
Best wishes,
Tedra
Logged
Mitch
Berserker Poster
*****
Offline Offline

Posts: 12837


WWW
« Reply #4 on: August 13, 2007, 05:35:58 AM »

Thanks for the update, hopefully somebody will get some good use out of it. Smile
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
Pages: [1]   Go Up
  Print  
 
Jump to: