|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL - Fatal error
[COLOR=Red][B][FONT=Comic Sans MS]FATAL ERROR: Could not connect to database on localhost (Access denied for user 'user'@'localhost' (using password: YES))
I have been trying to install this mccodes stuff to make an rpg for days. I keep getting this error... please help me figure out what I'm doing wrong. I took a screen capture but this forum will not allow me to post the url. I'll be glad to give a link to the screenshot. |
|
#2
|
|||
|
|||
|
do you have a database installed? have you changed the database password? have you entered that password in the script you are trying to run?
|
|
#3
|
|||
|
|||
|
Quote:
I bought my domain, I uploaded everything to the public folder, I installed the database, I ran the installer.php , I added users for the mysql, half way through the installer.php, I got that error code. |
|
#4
|
|||
|
|||
|
I would send a screen shot, but since I'm a noob to these forums it will not allow it.
|
|
#5
|
|||
|
|||
|
more info on my problem
I've thought about it, and perhaps I am not giving enough information... Let me try to improve on that.
Mccodes Version 2 Installer 1. Diagnostics >> 2. Configuration >> 3. Installation & Extras Basic Diagnostic Results: PHP version >= 4.2.0 OK Game folder writable OK MySQL support in PHP present OK Game installed at root level of domain or subdomain OK 1. Diagnostics >> 2. Configuration >> 3. Installation & ExtrasWrite Config... Config written. Attempting DB connection Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'user'@'localhost' (using password: YES) in /home/weedtax1/public_html/class/class_db_mysql.php on line 46 FATAL ERROR: Could not connect to database on localhost (Access denied for user 'user'@'localhost' (using password: YES)) |
|
#6
|
|||
|
|||
|
lines 36-49 of class_db_mysql.php
function connect()
{ if(!$this->host) { $this->host="localhost"; } if(!$this->user) { $this->user="root"; } if($this->persistent) { $this->connection_id=mysql_pconnect($this->host, $this->user, $this->pass) or $this->connection_error(); } else { $this->connection_id=mysql_connect($this->host, $this->user, $this->pass, 1) or $this->connection_error(); } mysql_select_db($this->database, $this->connection_id); return $this->connection_id;[highlight] |
|
#7
|
|||
|
|||
|
then the password or user for the database is incorrect. Double check things like spelling and case. make sure you look for an install text or readme and follow those instructions. look for a config file and make sure that the username and password for the database is in there and correct.
|
|
#8
|
|||
|
|||
|
I have checked that the user and pass are correct. I have since deleted the database and made a new one, checking once again to make sure that the user name and pass are correct, and they are. I have no submitted a support ticket to my host, to see if they can help me.
|
|
#9
|
|||
|
|||
|
Thank you very much for your assistance.
After contacting my Host, they showed me the error of my ways. ha. The user name was preceded by their very own method, of which they had not informed me. I have succeeded in accessing the database and this thread can be closed. Thanks again, and a +1 to you.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > SQL - Fatal error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|