Drupal (on mySQL update) lost ability to authenticate (title corrected)

Events happening in the community are now at Drupal community events on www.drupal.org.
lorlarz2's picture

Re: Drupal (on mySQL update) lost ability to authenticate (title corrected)

Since my lunarpages admins have upgraded the mySQL DB installation, my site home page now looks like this: http://mynichecomputing.org/drupal6/ (take a look; it is now an error page, suggesting procedures).

I have now twice tried the Drupal-suggested procedure, SET PASSWORD = PASSWORD('your_existing_password');

Though I give this SQL command in the ONLY place it makes sense '
to do it in phpMyadmin ,
all this does is disable my ability to get into phpMyadmin and has
NO positive effects, i.e. my http://mynichecomputing.org/drupal6/ remains
non-functional with the error page showing there instead of the site main page.

Each time I mess-up access to phpMyadmin, I have to create a
ticket and wait hours for them to reset it so I can get to that
admin tool -- what a pain

What the heck can I do?? Suggestions more than welcome.

Regards,
Brad

P.S. Frankly, I am rather frustrated with Drupal breaking itself, in such
a way. There should always be better ways than having this happen

Comments

lorlarz2's picture

After waiting very long periods of time, I clicked the button more than once. I apologize for multiple copies of the same post. I have yet to find where to throw the extra copies away. I would otherwise.

lorlarz2's picture

P.P.S.
The site, http://99online.us , aka http://mynichecomputing.org/drupal6 , has already been totally down 2 full days over this. I do not know what to do. I promised the "community" (the 99%+ of US citizenry ) that this site
would be up 3 years. It has only been up 1.5 years. I have meant to fulfill my promis.

Swift, sure help with this problem would be greatly appreciated (asap).

The trouble is Settings.php

wylbur's picture

The best place to look for insight to this issue is on the off-line error message:

"If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider.

The mysqli error was: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file.:

Th settings.php file contains the connection information and the credentials for accessing the mysql database. Your settings file is using the 4.1 settings. I would guess that your hosting provider has not updated your hosting to PHP 5, so that setting no longer works.

Take a look at the default.settings.php file that comes with Drupal 6. There will be information about the settings to use. Then just edit your settings.php file. This should get your sites running with PHP5.

You better blame your hosting provider and your site maintainer for breaking your site, not Drupal!

lorlarz2's picture

Indeed, the changing passwords (to something new or the same thing) seems to be a problem-in-general presently for my hosting provider.
Using the mySQL Databases facility in cPanel, I cannot change the password of any user of any database (even a new one I make) -- so they seem to have some general problem. When this gets straightened out (hopefully today), I suspect I can use this facility to do, in effect, what it says on the now-error-page at http://mynichecomputing.org .

If I cannot do that, I shall have to write a raw php file with the SET command to do it. All can be done with raw PHP, but I have simply been avoiding that.

I do have one question. If the password shows a %21 does that
really mean %21 is part of the password OR should this url-encoding
be changed to ! . There is this and a similar url-encoding: When I SET the password should the url-encoding version be used OR should I translate that to the actual character in my SET command?????

lorlarz2's picture

Quoting a note to my host provider support and server admin people: (quoting, part of it, hereon):

UPDATE: It appears NO PHP5 applications using modern "i-versions" of PHP functions work now
(example: $con=mysqli_connect($dbhost, $dbuser, $dbpassword, $dbdatabase); INSTEAD OF old fashion
$con=mysql_connect($dbhost, $dbuser, $dbpassword, $dbdatabase); (without the "i") <-- NOTE: I tested
this and indeed the latter (second, old) version of the command statement works (gives a connection to DB)
while the modern "i"-version does not (*and the error is virtually identical to error shown on
http://mynichecomputing.org/drupal6 (presently). (SEE THE DETAILS BELOW, FOR CLEAR EVIDENCE).

Anyhow, because of this general problem:
Here is another example: http://mynichecomputing.org/auction/ !!!!!!!!!!!!
I can likely find other examples!!!!

[snip] [<- Details left out for security reasons -- I just inserted this note HERE for this Comment/reply]

(quote continuing)

You apparently have a very serious problem, making all php5 applications, using modern command
statements NOT RUN.

BIG, BAD PROBLEMS.

*******We must know how you encrypt the mySQL5 passwords exactly,
so we can do it in script. *****

You also have other things to fix, previously note: IN MY LAST EMAIL, I WROTE:

RE: Trying to carry out Drupal instructions on the now-error-page,
http://mynichecomputing.org/drupal6 -- i.e., trying to reset the password to
what it already is, to get a new, more secure hash that Drupal will find
acceptable (given the version of mySQL):

I go to the mySQL Databases facility in cPanel and find a user and try to change
a password, either to something new or to what it is already, and the facility
tells me that the OLD password is incorrect. I made a new user and have the
same problem!!!

All the host company did was ...

lorlarz2's picture

Wilbur

All the host company did (supposedly) was update the version of the mySQL databases
and then my drupal sub-site spontaneously broke.

I did notice they appeared to have downgrade the PHP default to a version 4 (it was version 5, and a newer one) , so I went ahead and (on phpMyadmin) changed the default PHP back to PHP5. So, that should not be a problem.

I am looking to the hosting company for the proper place to reset the
drupal6 user password to what it is successfully (which I have not yet done and seems like what needs to be done). When I can finally really do that (in effect, as suggested on the now-error-page at http://mynichecomputing.org/drupal6 ) then all may be well.

If their suggestions work, I will come back and tell you. And, if they do not work I will also come back and moan some more.

Thanks for your attention.

As Wylbur pointed out, this

jerdavis's picture

As Wylbur pointed out, this is an issue with the change your hosting provider made, updating the environment and not a particular problem with Drupal. It doesn't look like a PHP bump that caused the problem, but moving your database from a very old version of MySQL to, most likely, MySQL 5.x.

In your settings.php file there is connection information for MySQL; including the name, password and database host. For the username your site is connecting as, that user's password needs to be reset in MySQL using the instructions above so that the user table in MySQL has a hashed password stored. Most likely it was storing a plain text password in the previous version of MySQL. Given your problems in changing passwords and getting locked out it likely makes sense to try to get support from your hosting provider in taking this action. With that done, Drupal should be able to connect to the database again.

For future reference, this isn't really the best or most appropriate place to request this type of support. There are help forums on Drupal.org and there are also other support resources such as #Drupal / #Drupal-Support on IRC and http://drupal.stackexchange.com/. Those would be more appropriate venues for support. If you continue to have trouble, please move your issue to one of these venues - though for this particular issue, you really should be working with your hosting provider (and maybe finding a new one :))

Thanks!

Jeremiah

Reply to jerdavis

lorlarz2's picture

I am dealing with the host, given a general change-password problem (which I noted in a reply to Wylbur, which was supposed to be a reply to
your post -- let's see where this reply shows up).

Anyhow, as noted : I do have the question y'all could help with:

If the password shows a %21 does that
really mean %21 is part of the password OR should this url-encoding
be changed to ! . There is this and a similar url-encoding: When I SET the password should the url-encoding version be used OR should I translate that to the actual character in my SET command?????

jerdavis: see my last comment/reply to wylbur

lorlarz2's picture

Again I tried to reply to you and I replied to Wylbur instead (though the reply is relevant there too). Anyhow: jerdavis: see my last comment/reply to wylbur

Twin Cities

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: