NameSilo

Database connect

SpaceshipSpaceship
Watch

redhippo

VIP Member
Impact
22
Warning: mysql_connect(): Access denied for user: 'box@localhost' (Using password: YES) in /home/lembu/public_html/config.php on line 15
Cannot connect to the database.

whats wrong?
how do i set the mysql data base/\?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
whats wrong?
how do i set the mysql data base/\?




connecting to the database usually is by enterring your username followed by the db name/ db username:

such as:

username_dbname

username_dbusername

password


if your ftp username is "sitename" and your database is called "frogs", your db username and password are "tanks" and "bangers" resoectively, then it would look like this:

sitename_frogs

sitename_tanks

bangers


hope this helps!
 
0
•••
Edit your config.php file and replace the values for database name, database username and password with the correct settings for your database. Those settings are provided to you by your webhost, or setup by you through your web hosting control panel.

For example, code used with PHP to connect to a MySQL database:

PHP:
$dbuser = "database username";
$dbpass = "database password";
$dbname = "database name";
$dbhost = "localhost";

mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname) or die("Unable to select database");

Replace the values for the first three lines with the correct settings for your database.
 
0
•••
let me know if you need some help- i will gladly help you out :)
 
0
•••
thanks all...fixed
 
0
•••
have another similiar problem...anyone can help me now?? on msn?
 
0
•••
Error 1044

-RJ- said:
Edit your config.php file and replace the values for database name, database username and password with the correct settings for your database. Those settings are provided to you by your webhost, or setup by you through your web hosting control panel.

For example, code used with PHP to connect to a MySQL database:

PHP:
$dbuser = "database username";
$dbpass = "database password";
$dbname = "database name";
$dbhost = "localhost";

mysql_connect($dbhost,$dbuser,$dbpass);
mysql_select_db($dbname) or die("Unable to select database");

Replace the values for the first three lines with the correct settings for your database.


i have done that but i get this now:

Attempting to attach to database

Connect failed: unexpected error from the database.

Error number: 1044

Error description: Access denied for user: 'anforum_perawan@localhost' to database 'anforum_forum'

Please ensure that the database and server is correctly configured and try again.
 
0
•••
Fixed It :)
 
0
•••
You need to give that user permissions for that database!
 
0
•••
Tjobbe said:
whats wrong?
how do i set the mysql data base/\?




connecting to the database usually is by enterring your username followed by the db name/ db username:

such as:

username_dbname

username_dbusername

password


if your ftp username is "sitename" and your database is called "frogs", your db username and password are "tanks" and "bangers" resoectively, then it would look like this:

sitename_frogs

sitename_tanks

bangers


hope this helps!


You seem to be assuming he is using cpanel but a database name does not always bear any relation to the account details of the ftp or control panel.
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back