icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » MySQL Help

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 29th, 2004, 8:49 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
5 posts
Gave thanks: 0
Thanked 0 times
MySQL Help

Hi guys, searched a little but couldn't find any direct answers, I am new to SQL and I am trying to set up a vBulletin Board, I have created the DB and user, added these to the config.php script but I get this error, what am I doing wrong?
Quote:
Step 2) Connect to the database

Attempting to attach to database


Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/*******/public_html/forums/includes/db_mysql.php on line 140

The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.
here is the script, of course stars replaced the actual names
Quote:
$servername = '********.com:3306';

// ****** DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$dbusername = '****_*****';
$dbpassword = '******';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = '*****_***';
graphicart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 8:58 PM   #2 (permalink)
Peaches!
Excelling Contributor
 
Joined in Jul 2003
Lives in Ottawa, Ontario, Canada
Hosted on Jose, Pass19
564 posts
Gave thanks: 0
Thanked 0 times
Did you add the user to that database? To do it if you haven't already, just go into cPanel then the MySQL Databases and find at the end of the list of databases two drop down menus, select the user you're useing and the database, then click Add User to Db.

Also, for the $servername, you only need localhost.
__________________
alex.honeywell [ seigousei.net - pass19, binuweb.com - jose ]
AlexH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 9:17 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
5 posts
Gave thanks: 0
Thanked 0 times
Yes, I should have added that, the user was added and the Access Host is localhost, But I got that error, so know I am puzzled, does the upload folder have to be in the public_HTML directory or the root or where?
thanyou for your quick reply, much appreciated,
Did you mean in the script or on the MySQL page
Quote:
$servername = '********.com:3306';
Quote:
$servername = 'localhost:3306';

Last edited by graphicart; August 29th, 2004 at 9:20 PM..
graphicart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 9:28 PM   #4 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Quote:
Originally Posted by graphicart
Yes, I should have added that, the user was added and the Access Host is localhost, But I got that error, so know I am puzzled, does the upload folder have to be in the public_HTML directory or the root or where?
thanyou for your quick reply, much appreciated,
Did you mean in the script or on the MySQL page
should not be a PORT- ditch the :3036
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 9:55 PM   #5 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
5 posts
Gave thanks: 0
Thanked 0 times
Did that but still get this:

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/*******/public_html/forums/includes/db_mysql.php on line 140

The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

Also the script staes this:
This is the hostname or IP address of the database server.
// It is in the format HOST:PORT. If no PORT is specified, 3306 is used.
// If you are unsure of what to put here, leave it at the default value.
graphicart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 29th, 2004, 11:34 PM   #6 (permalink)
Peaches!
Excelling Contributor
 
Joined in Jul 2003
Lives in Ottawa, Ontario, Canada
Hosted on Jose, Pass19
564 posts
Gave thanks: 0
Thanked 0 times
Use 'localhost' (without the quotes)
__________________
alex.honeywell [ seigousei.net - pass19, binuweb.com - jose ]
AlexH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 30th, 2004, 12:08 PM   #7 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
5 posts
Gave thanks: 0
Thanked 0 times
just wanted to thank you all for the help, although I'm guessing there must be some delay after you set up a MySQL Bd before you can access it because I tried one more time with the original settings I had and it worked
graphicart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On