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 question

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

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old January 2nd, 2006, 9:17 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Oct 2005
4 posts
Gave thanks: 0
Thanked 0 times
MySQL question

I'm setting up an oekaki.
there's a install page that's installing it for me, and i went to cpanel to create a db, and this is the error i get.

Warning: mysql_connect(): Unknown MySQL server host 'newcast_' (1) in /home/newcast/public_html/pianist/create/oekaki/oekaki/dbconn.php on line 9
Could not connect to the MySQL database.

these are the Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:newcast_:localhost","newcast_" ,"<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "newcast_", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("newcast_");

and on the setup form, it asks me

Database Hostname

Database Name

Database Username

Database Password


so what do i put in each box?
tendays is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2006, 9:35 PM   #2 (permalink)
is scientific.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,117 posts
Gave thanks: 8
Thanked 34 times
http://www.ninehours.com/tutorials/1

That is tailored towards a Xoops install, but the database section is the same for any script you'll be installing.

Quote:
You also should have a database setup and ready for Xoops to install into. In Cpanel, this is easy to do. Simply log into your Cpanel account, and look to the right to make sure you are able to make a database by checking the number you are able to have. As long as you can create one, click MySQL Databases. There you will be able to make a database, make a user with a password, and attach that user to the database you've made. Remember these two things:

1. Attach the user to the database by adding them to the appropriate one in the list.
2. Remember that your username and database will likely be proceeded by your account username. So, if your account user name is "markrc", and your database is called "database", than the database will actually be called "markrc_database". The same goes for the username. If the user is called "Bill", than the database username you made will actually be called "markrc_Bill".
That should help you get your database made and going, so you can connect to it.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 2nd, 2006, 10:28 PM   #3 (permalink)
is scientific.
Resident.
 
David's Avatar
 
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,117 posts
Gave thanks: 8
Thanked 34 times
Or this http://www.ninehours.com/tutorials/4
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David 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