Current time: 12-23-2024, 01:50 PM Hello There, Guest! (LoginRegister)


Post Reply 
[solved] Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
Author Message
b_admin Offline
Junior Member
*

Posts: 13
Joined: Jan 2008
Reputation: 0
Post: #1
[solved] Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
Hi there,

as in german corner nobody seems to be able to help me out I'll ask here for a solution or any ideas on how to solve the issue.

Two days ago I tried to do an update from 1.0.6 to 1.0.7. Running version was error free and everything worked as expected. I followed the update instructions (including installing all necessary packets), did backup and run the installation procedure. Everything went fine until I came to executing ispcp-update. The script aborted when coming to point rebuild_customers_cfg() with message:
Code:
[ERROR] Unable to connect SQL server with current DSN: DBI:mysql:ispcp:localhost root [....]
I found the possible solution to newly set the db password in /etc/ispcp/ispcp.conf using /var/www/ispcp/engine/ispcp-db-passwd. This worked and the new hash differed from the old one (I then also found out to put this hash to /etc/ispcp/ispcp.old.conf to take effect).
Next I rerun the update script which then aborted at update_database_schema() with error
Code:
[ERROR]: Error: Unable to establish connection to the database! SQL returned: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Deleting the password from config file resulted in error
Code:
Error: Unable to establish connection to the database! SQL returned: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

Any help to solve this would be fine. Currently I'm back on a half-way working 1.0.6. but I would like to update to current version a.s.a.p..

System:
virtual root server running debian 5.0.7
PHP 5.2.6-1+lenny9
Perl 5.10.0
mysql 5.0.51a
(This post was last modified: 12-15-2010 09:34 PM by b_admin.)
12-10-2010 10:49 PM
Find all posts by this user Quote this message in a reply
nad1r Offline


Posts: 2
Joined: Dec 2010
Reputation: 0
Post: #2
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
I had very similar problem just a moment ago. I have sheldued upgrade for this night... too bad i have not read forums before Tongue
Anyway, what i have done is not worth to recommend, but hey i need to have my server up and running till morning!

nano /etc/ispcp/ispcp.conf

find:
# Don't change this one
DATABASE_TYPE = mysql

DATABASE_HOST = localhost

DATABASE_NAME = ispcp

DATABASE_PASSWORD = asdyourpasshashhere

DATABASE_USER = root

Delete " asdyourpasshashhere" yes with the " " before. It should be like this:
"DATABASE_PASSWORD ="

Now /var/www/ispcp/engine/ispcp-db-passwd
I set this to same password, dunno why it had diff hash...
I was trying to upgrade to 1.0.7 before... and i thinked "trunk" needs to have some fixes mabey and I dont have time to try everything. So.. I have done next not recomended thing:
http://isp-control.net/documentation/sta...ade/debian

And guess what.. it worked Smile I will lookup into this deeper later and correct all things, I'm happy my customers can use their websites and i do not have to "reinstall" IspCP. And I can go sleep now.

As i said I do not recommend it, but it worked for my problem.
Sorry for my english ;]
And GL
12-11-2010 10:46 AM
Find all posts by this user Quote this message in a reply
nad1r Offline


Posts: 2
Joined: Dec 2010
Reputation: 0
Post: #3
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
I have downgraded to 1.0.7 this way. Now everything is very ok and i can go sleep.
Remember to copy newly generated password hash to ispcp.old.conf ;]
12-11-2010 12:33 PM
Find all posts by this user Quote this message in a reply
b_admin Offline
Junior Member
*

Posts: 13
Joined: Jan 2008
Reputation: 0
Post: #4
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
(12-11-2010 10:46 AM)nad1r Wrote:  nano /etc/ispcp/ispcp.conf

Delete " asdyourpasshashhere" yes with the " " before. It should be like this:
"DATABASE_PASSWORD ="

Now /var/www/ispcp/engine/ispcp-db-passwd
I set this to same password, dunno why it had diff hash...

Great idea! And guess what: I already did it several times. The result I already described above.

Quote:I was trying to upgrade to 1.0.7 before... and i thinked "trunk" needs to have some fixes mabey and I dont have time to try everything. So.. I have done next not recomended thing:
http://isp-control.net/documentation/sta...ade/debian

And guess what.. it worked Smile I will lookup into this deeper later and correct all things, I'm happy my customers can use their websites and i do not have to "reinstall" IspCP.

I don't want to install trunk as this usually inserts additional problems. I can't believe it's that hard upgrading from 1.0.6 to 1.0.7. In my case it's one step that's failing. And no one seems to know what to do to make it work? That's pretty sad. I still hope someone's gonna come out with a useful hint.
12-11-2010 09:13 PM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #5
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
If you need to change the password for the "ispcp" user for whatever reason, you can do so inside MySQL when connected as "root" (or another user with root-level permissions). Check the user definition in the database "mysql", table "user". You're only interested in the "Host" and "User" columns.

Now, follow the set password information over at the MySQL reference manual to set the new password.
12-12-2010 06:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
b_admin Offline
Junior Member
*

Posts: 13
Joined: Jan 2008
Reputation: 0
Post: #6
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
Is it really so hard to understand? The password is correct but the update scripts fails using these credentials for updating the tables from 1.0.6 to 1.0.7.
I don't know for what reason I would have to renew the password in the mysqltable. If there IS any reason, please tell me!
ATM I'm stuck with a non-working update script.

ANY help would be fine!
12-12-2010 07:18 AM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #7
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
Based on the information you provided, the password is incorrect. Way back on post #1, you noted that you created a new hashed password, which you put in icpcp.conf. This resulted in an issue connecting to the database when using that password. You also stated that on removing the password (blanking it), you got a similar error. Note that the second (third in the post) error message indicates that a password is not being used for "root".

You need to set the correct password in ispcp.conf or set a new password in there and change to that in MySQL.
12-14-2010 12:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
b_admin Offline
Junior Member
*

Posts: 13
Joined: Jan 2008
Reputation: 0
Post: #8
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
1. I changed the password in ispcp.conf after the update script didn't work with the 'old' password (first error message). I guess, this is clearly stated in the second paragraph of the first post, isn't it?

2. I searched for solutions for the given error message and found the hint to delete the password hash from ispcp.conf and set it again with ispcp-db-passwd. I provided the same password but nevertheless the hash differed from the old one.

3. Using this newly hashed password -- which itself was the same as before, e.g. the same as in database -- resulted in a very early abort of update script (second error message).

4. I tried with no password hash in ispcp.conf, thinking, the script might ask for a password when there is none set. But it didn't and just aborted (third error message).

Again: I never set a new password, all I did was rebuilding the password hash but this hashing mechanism seems to have changed since 1.0.6 as the new hash differs from old one.
12-14-2010 07:24 PM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #9
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
AFAIK, that isn't a hash, it's the actual password. Hashes are one-way. Without the actual password, you wouldn't be able to connect.

I ignored the first message since you are well past that stage (that first error message looks like MySQL wasn't fully up or running at that point, the later two messages are actual errors from the MySQL daemon, so it was working).

Instead of arguing, why not at least try the suggestion?
12-15-2010 01:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
b_admin Offline
Junior Member
*

Posts: 13
Joined: Jan 2008
Reputation: 0
Post: #10
RE: Error upgrading 1.0.6->1.0.7: database pw becoming incorrect
Sorry, I just realized that my last postings are deleted (in this thread as well as in the one in german corner). Don't know why they are gone but the issue is already solved. I even marked this thread as solved but all this seems to be reverted.
So excuse me for being a bit offending but I assumed you were one of those reading-the-title-and-answering-immediately-guys.

For you further answer: This actually IS a hash of the given password in ispcp.conf! But I guess the hashing algorithm differs from the one used before therefore resulting in a different hash.
12-15-2010 02:08 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)