| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#10 (permalink) |
|
Registered User
On a golden path...
Joined in Sep 2005
Lives in The Mountains
Hosted on Pass43
331 posts
Gave thanks: 16
Thanked 14 times
|
This from David's site: http://www.afterbeing.com/forum/index.php?topic=4.0 and it fully explains how to setup a MySql database using cPanel.
|
|
|
|
|
|
#11 (permalink) |
|
URB4N 5K1LLZ
Super #1
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
|
When you add the user to the database and click SUBMIT, the page will then tell you to select the privileges for that user. If you do not know the "root" user's privileges, selecting ALL is always a plus.
|
|
|
|
|
|
#15 (permalink) |
|
URB4N 5K1LLZ
Super #1
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
|
That's weird, it should work. can you show me a copy of how exactly your are inputting the information? You don't have to show the whole file, just that part that requires you to enter the database information, so that I may see where the error lies.
|
|
|
|
|
|
#16 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2005
99 posts
Gave thanks: 0
Thanked 0 times
|
class DB {
function DB($hostname, $database, $databaseUsername, $databasePassword, $databaseType = "MySQL"){ $this->hostname = $hostname; $this->database = $database; $this->databaseUsername = $databaseUsername; $this->databasePassword = $databasePassword; $this->databaseType = strtolower($databaseType); $this->makeConnection(); $this->debug = false; } function makeConnection() { $this->connection = mysql_connect( $this->hostname, $this->databaseUsername, $this->databasePassword) or trigger_error(mysql_error(),E_USER_ERROR); } |
|
|
|
|
|
#17 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2005
99 posts
Gave thanks: 0
Thanked 0 times
|
I test it on my Vista window localhost and it show up " ODBC
localhost" Access Denied (Using password: NO)It will allow me to create the database and table in the database, but it wont show up when I browse to my index.php When I test it on my website. EX: www.abc.com I get "abc localhost" access denied ( Using Password: NO ) |
|
|
|
|
|
#18 (permalink) |
|
URB4N 5K1LLZ
Super #1
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,660 posts
Gave thanks: 81
Thanked 128 times
|
By any chance, is there anything that looks like this:
define('DB_NAME', 'DATABASENAME'); define('DB_USER', 'DATABASEUSER'); define('DB_PASSWORD', 'PASSWORD'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); In your php? Sorry to ask you this again, but this time can you send me the whole file. Please send it as an attachment in the post so I can download it and look at it fully to understand it. There should be a place where you need to define your database information for the script to work. It won't just automatically take it from the list of databases. Also what script are you trying to use, if you don't mind me asking? =) |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|