mysqlnd cannot connect to MySQL 4.1+ using the old insecure

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

mysqlnd cannot connect to MySQL 4.1+ using the old insecure

Post by urheat »

After activating needed PHP 5.4 I get a following error:

Code: Select all

Database Connection Failed
Error: 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 (2000)
Function Performed: CONNECT

Fatal error: Attempt to connect to database tekijainfo on user@db.fi failed in /biz/0/user/lib/adodb.functions.php on line 61
Especially "old-passwords flag" sounds confusing... And is this needed with CMSMS?

What tasks I should do to get CMS Made Simple site running again?
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by staartmees »

your cmsms-version?
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by urheat »

staartmees wrote:your cmsms-version?
1.11.11
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by Dr.CSS »

That is a server issue I believe...
you might need to remove the old-passwords flag from your my.cnf file
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by urheat »

Dr.CSS wrote:That is a server issue I believe...
you might need to remove the old-passwords flag from your my.cnf file
Yes - this is a server issue. But after some googling, the workaround isn't the easiest one. I assume that quite many CMSMS sites have to upgrade to PHP 5.4 some time and then this problem may occur.

I got lucky, 'cause my host provided an easy way out. I just changed SQL-password and everything was running fine again. But I don't think that every host has the same service.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by twen88 »

You are correct, I am having exact issue you had right now and working with the hosting ppl to see if this can be resolved. I was trying to upgrade my php from 5.3X to 5.5X and lost the database connection.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by urheat »

@twen88

Did you managed to get the site running again? If so, what did you do?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by velden »

The error almost literally says what you could do:

Code: Select all

Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password')
Note that is about sql statements on your mysql server.
I got lucky, 'cause my host provided an easy way out. I just changed SQL-password and everything was running fine again. But I don't think that every host has the same service.
I hope many hosting providers provide that service. Or at least provide tools to do that yourself. Either by their web-based admin or phpmyadmin or...

It is not an PHP upgrade issue but more an MySQL upgrade issue. I doubt whether it's a cmsms problem, because I think many cmsms websites run on php 5.4 and MySQL 4.1+ a long time.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by urheat »

velden wrote:The error almost literally says what you could do:

Code: Select all

Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password')
Based on what I've read before my host corrected the problem, this isn't solved so easily. There are many quite complecated instructions available. Luckily I didn't have to try those.

As you said, this is not CMSMS problem, but quite many CMSMS users will face this problem. It would be great if there could be some kind of info/help beforehand. But maybe I'm just worrying too much ;)
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by twen88 »

urheat wrote:@twen88

Did you managed to get the site running again? If so, what did you do?
No, not yet, the hosting ppl have spent a few days so far to resolve this issue but I have not yet seen a conclusion.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by Jeff »

The simple solution (I have not tested it since I don't have a site with this problem).

Go into your cpanel click on MySql Database in the database section (if you don't have that you should be able to do it in PHPMyAdmin), scroll down to the MySql users section, find the user for your CMSms install and click set password.

That being said if you have a host that can't figure this out, you need to find a new hosting provider.

Thanks,
Jeff
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by velden »

Jeff wrote:Go into your cpanel click on MySql Database in the database section (if you don't have that you should be able to do it in PHPMyAdmin), scroll down to the MySql users section, find the user for your CMSms install and click set password.
In addition, if you set another password than the previous one, change database password in config.php too.
twen88
Forum Members
Forum Members
Posts: 118
Joined: Thu Aug 16, 2007 8:07 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by twen88 »

The weired thing is that

1)when I switch the site to php5.5, I got this message:

Database Connection Failed
Error: The server requested authentication method unknown to the client (2054)
Function Performed: CONNECT

2) when I use php5.3, everything is fine except some of the CG modules are having some issues.

3) when I run the script below under php5.5, I got a "Database Connected successfully" message。

<?php
mysql_connect('db_host', 'db_username', 'password') or die('Could not connect the database : Username or password incorrect');
mysql_select_db('db_name') or die ('No database found');
echo 'Database Connected successfully';
?>

Therefore, I think the database is fine, it is the cmsms that is having some issue with connecting to the database under php5.5. And I did try resetting the password with the same result.

this is my site info:

Here is my system info:

CMS Version 1.11.11

CGExtensions 1.44.3
CMSMailer 5.2.2
CMSPrinting 1.0.5
FileManager 1.4.5
MenuManager 1.8.6
MicroTiny 1.2.7
ModuleManager 1.5.8
News 2.14.4
Search 1.7.11
ThemeManager 1.1.8
FrontEndUsers 1.24.1
FEUMailer 0.9.4
CustomContent 1.10
FEmessages 1.2
SelfRegistration 1.8.2
TinyMCE 2.9.12
CGCalendar 1.14.3
CGSimpleSmarty 1.7.4
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by staartmees »

I use cmsms 1.11.11 under php 5.6.4 without any problem.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: mysqlnd cannot connect to MySQL 4.1+ using the old insec

Post by velden »

What is set in config.php for:

Code: Select all

$config['dbms']
And could you post whole system information? And note there is a special format of system information for pasting into forum posts. The link is at the right to and named "View Text Report (suitable for copying into forum posts)"
Post Reply

Return to “The Lounge”