problems with sql database after upgrading problems with sql database after upgrading
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

problems with sql database after upgrading

Started by hoodiegrrl, October 11, 2006, 06:46:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hoodiegrrl

here is the story...

my website was working fine a few weeks ago. a couple days ago, i tried accessing it and all i got was a blank, white page. after reading through the forums, i saw that i had to upgrade. i copied all files and directories except for albums, anycontent.php, and include/config.inc.php as instructed. http://www.mydomain.com/mycopperminefolder/update.php and got a message similar to the one below (i didn't copy it when i first saw it but did notice someone had posted something similar):

Could not create a mySQL connection, please check the SQL values in include/config.inc.php

MySQL error was : Access denied for user: 'username@host###.xxx.xxx.secureserver.net' (Using password: YES)


on the page with http://www.mydomain.com/mycopperminefolder, i got the following:

Coppermine critical error:
Unable to connect to database !

MySQL said: Access denied for user 'xuser'@'xx.xx.xxx.128' (using password: YES)

i went into mysql and entered 1 under debug. no improvement. i checked include/config.inc.php and saw that my password was not exactly as it should be. i tried to edit it (to be honest, i wasn't sure how, so i just copied the same thing into word and then later changed the file to a php). i also removed the config.inc.phpSAMPLE file (wasn't sure if it belonged there). tried to run the update again and got 1/2 a page full of symbols such as *&$^*&^(*&^&*^*. i put the unedited config.inc.php and config.inc.phpSAMPLE files back. on the update page, i got the same message as the first one posted above. on the www.mydomain/mycopperminefolder page, i now get the following:

Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

i also checked the connection string posted on my host's page. it states this:

This example describes using PHP to connect to a MySQL Database on a Linux hosting account.

<?php
//Connect To Database
$hostname="mysql##.secureserver.net";
$username="myusername";
$password="your_password";
$dbname="mydbname";
$usertable="your_tablename";
$yourfield = "your_field";

mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later.");
mysql_select_db($dbname);

$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result) {
    while($row = mysql_fetch_array($result)){
        $name = $row["$yourfield"];
        echo "Name: ".$name;
    }
}
?>

any suggestions on how to fix?

sorry for the long post, but i figure i should indicate the steps i've taken. on a side note - i am not that familiar with php or mysql, but am usually pretty good at figuring things out if i research (ie read the forums) or rtfm (which i did). unfortunately, neither helped. i saw others who had similar issues but it seemed they were at least able to get into/see their pages. i can't access mine at all.

Joachim Müller

Forget include/config.inc.php.sample, it's irrelevant and not being taken into account, you can savely delete it, it is just an example.
However, you need to edit include/config.inc.php. The main error you made was editing it with MS Word - you have to use a plain text editor (notepad.exe is fine) to edit that file and fill in the needed details there. If you're not sure what has to go into it, you will have to ask your webhost. You can't make things up there.

hoodiegrrl

well, i think i messed things up ROYALLY. i edited within notepad and copied the file into the appropriate folder. somehow, i accidentally chose "always use this program (notepad) to open this type of file" - or something like that. now all the php files in my ftp folder have the notepad icon instead of php. didn't think this really mattered, but now i can't open the ftp files at all. when i go to mydomain.com i am still getting the same error message as before. i tried to open mydomain.com/mycopperminefolder/update.php and am now getting the 1/2 page of symbols again. since i have a backup of the album directory, anycontent.php, and config.inc.php - can i just start from scratch, re-install the whole program, and overwrite the new files with the backups, directing it to the database from before? i don't know if that is even possible, or if i'm just making stuff up in my head. and i may run into the same problems with php files being saved as notepad but, at this point, i'm not really sure what else to do.

Joachim Müller


hoodiegrrl

wow... you are a lifesaver. for those of you who may run into a similar problem, mine was this (i think):

the password in the config.inc.php file was not correct. after i updated, i was still running into problems. apparently, the permissions weren't set correctly for the file. once i updated, everything was smooth saililng.... look was different - have a few other updates to make, but at least the page is there and functioning.

thanks again for all your help. case closed!