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, 05:13:01 AM

Pages: [1]   Go Down
  Print  
Author Topic: setting up mySQL database on server  (Read 844 times)
thomasthebeliever
Newbie
*
Offline Offline

Posts: 4


« on: September 10, 2004, 06:57:44 PM »

Hi there
I bought me some dreamweaver template which require to set up a mySQL database on the server. I just followed their tutorial step by step but when I entered the database info and then try to open it, the following message appears:

Warning: mysql_connect(): Access denied for user: 'kktrad2@quasor.lunarpages.com' (Using password: YES) in /home/kktrad2/public_html/monohawaiishop/vsadmin/db_conn_open.php on line 14
You need to set your database connection in vsadmin/db_conn_open.php.

The database info I entered in the file vsadmin/db_conn_open.php looks as follow:

$db_username = "kktrad2_tom";  // Your database login username
$db_password = "password";  // Your database login password
$db_name = "kktrad2_monohawaii";      // The name of the database you wish to use
$db_host = "localhost";   // The address of the database. Often this is localhost, but may be for example db.yoursite.com

I double checked and the info is exactly on how it shows on the cPanel.

No clue on what is wrong.

Any suggestions are very much appreciated.

Cheers
Logged

Tom
Priest
Darth Vader
Support Supervisor
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3871



WWW
« Reply #1 on: September 10, 2004, 07:01:55 PM »

Has the user been added to the database in your cPanel?  This is the most often left-out step in database creation because the button is kind of hard to see.
Logged

Lunarpages Web Hosting ~ Lunarpages Forums ~ Lunarpapages Affiliate Program

Steven Priest
Customer Services Supervisor, Technical Support
Geeky Perl Aficionado
College Guy

For all the things I cannot change...™
thomasthebeliever
Newbie
*
Offline Offline

Posts: 4


« Reply #2 on: September 10, 2004, 07:06:37 PM »

Wow, that was a quick response - I am impressed - many thanks.

What I did is I opened a user called kktrad2_tom (somehow the kktrad2 was already there, so it must be that there are now 2 users having acccess). Anyway, I quickly copied on what I can see on the mySQL page:


Users in monohawaii
kktrad2_tom (Privileges: ALL PRIVILEGES)

Connection Strings

Perl
$dbh = DBI->connect("DBI:mysql:kktrad2_monohawaii:localhost","kktrad2_tom","<PASSWORD HERE>");

PHP
$dbh=mysql_connect ("localhost", "kktrad2_tom", "<PASSWORD  HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("kktrad2_monohawaii");
Logged

Tom
Priest
Darth Vader
Support Supervisor
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3871



WWW
« Reply #3 on: September 10, 2004, 07:12:05 PM »

ok, it seems that the user has been added to the database correctly.  Have you verified that you are using the correct password for that username?  You may want to try deleting and recreating the user.
Logged

Lunarpages Web Hosting ~ Lunarpages Forums ~ Lunarpapages Affiliate Program

Steven Priest
Customer Services Supervisor, Technical Support
Geeky Perl Aficionado
College Guy

For all the things I cannot change...™
thomasthebeliever
Newbie
*
Offline Offline

Posts: 4


« Reply #4 on: September 10, 2004, 07:26:31 PM »

just recreated the user once more and double checked the password - it is correct.
Tried access with Safari (MAC) and Internet Explorer by enterning the following information (according tutorial):

http://www.kktrading.com/monohawaiishop/createdb.php

again, the same message appears
Warning: mysql_connect(): Access denied for user: 'kktrad2@quasor.lunarpages.com' (Using password: YES) in /home/kktrad2/public_html/monohawaiishop/vsadmin/db_conn_open.php on line 14
You need to set your database connection in vsadmin/db_conn_open.php.
Logged

Tom
Priest
Darth Vader
Support Supervisor
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3871



WWW
« Reply #5 on: September 10, 2004, 07:39:36 PM »

Sorry, my brain must've taken a leave of absense.  You will need to edit the public_html/monohawaiishop/vsadmin/db_conn_open.php and insert the correct username/password for the database in that file.  I logged into your account and checked it and it is not currently set to the username you identified in your original post.
Logged

Lunarpages Web Hosting ~ Lunarpages Forums ~ Lunarpapages Affiliate Program

Steven Priest
Customer Services Supervisor, Technical Support
Geeky Perl Aficionado
College Guy

For all the things I cannot change...™
thomasthebeliever
Newbie
*
Offline Offline

Posts: 4


« Reply #6 on: September 10, 2004, 07:52:42 PM »

you were right - I changed it to the kktrad2 user name to see if this worked - which didn't.

BUT THANKS - after setting up the account once more it finally worked, the database has been installed.

Cheers - you helped me a lot - I am truly impressed at the service of you and LUNAR - great response time. They all promise it - but you deliver !!!! THANKS Applause
Logged

Tom
Priest
Darth Vader
Support Supervisor
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3871



WWW
« Reply #7 on: September 10, 2004, 08:07:47 PM »

Glad we got you all sorted out  Thumbs Up
Logged

Lunarpages Web Hosting ~ Lunarpages Forums ~ Lunarpapages Affiliate Program

Steven Priest
Customer Services Supervisor, Technical Support
Geeky Perl Aficionado
College Guy

For all the things I cannot change...™
Loren
Galactic Royalty
*****
Offline Offline

Posts: 321



« Reply #8 on: September 10, 2004, 09:15:56 PM »

Priest man your a quick one I tell YOU!
Logged

Visit my site: http://www.fragacow.com
Visit my Forums: http://www.fragacow.com/forum/

Don't forget the tutorials: http://www.lunarpages.com/tutorials
Pages: [1]   Go Up
  Print  
 
Jump to: