CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> General/Other

 MySQL Connection Error (authentification with old password)

Print topic Send  topic

Author Message

Posts: 1
Posted: 01/31/2015, 7:27 AM


I'm new in CCS, I try to connect to MySQL Internet Database in my server, it have MySQL Remote Access Enabled, but when test the connection receive this error:

Test connection failed because of provider initialization error. Authentication with old password no longer supported, use 4.1 style password. Continue?. (Yes/No).

How I can change to use 4.1 style password? or how to connect in this case.

J. Perdomo
View profile  Send private message

Posts: 37
Posted: 02/26/2016, 1:26 PM

This is an old thread but I ran into this recently. This issue, and the subsequent damage to the common.php file that was caused, kept me busy for 5 days, so hopefully I can help someone else here avoid this.

First, the problem is that the older style MySQL database uses 16 byte hashes for passwords. The newer style is 41 bytes. If you want to make the problem go away on the database side, you need to have access to the my.cnf file. You may not have that access in a shared hosting environment such as MediaTemple, unless you purchase an upgraded container. This file needs to have the following set:

old_passwords = 1

Then you need to reboot the server. After that it will accept short hashes, so change the password on your database (to get rid of the long hash password already there), and your problem is solved. However, you have now weakened your database security.

To test whether this is working, you can use phpMyAdmin (or anything else) to send the database the following SLQ:


If this is turned on properly to accept the old, short hashes, it will say the value is ON.

BTW, the best way to test whether this is working (and therefore likely to work in CCS) is to write a very short program in php that simply connects to your database using mysql_connect. Otherwise, with CCS you may not know whether you have other problems. If your database will accept short hash passwords, and in fact has one in there, this program will work. Now copy the program and use mysqli_connect instead. This one should work with long hash passwords. I used this method to tell whether I was out of the woods on the issue. At one point after I had the database server accepting old style passwords, the mysql_connect version still wouldn't work!

As it turns out, you may have to lower the version of PHP that you're using in addition to changing the database. I went from 5.5.21 down to 5.3.29 (my two choices) and the test program suddenly started working! That's why you want a short test program and not all the overhead of CCS when you're trying to debug this.

In researching this, CCS support told me that they had already implemented support for this problem, but it certainly wasn't clear to me. If you go to your project settings, Connections, and the Server tab, you'll see that you have a choice in your PHP Database Library from a list box. I have always used MySQL. However, if you choose "Improved MySQL" you will then implement the mysqyli_connect method. In fact, you'll see that instead of the db_mysql.php file which is generated by CCS, you'll have a db_mysqli.php file!

I'd like to tell you that implementation solved all my problems, but as it turned out, that solution started throwing ccsForm parameters in the URL resulting in blank pages. I'll post a discussion of this elsewhere (someone else mentioned it in a post), but the cure for that, amazingly enough, is locating an extraneous carriage return and linefeed at the end of common.php, right after the final ?> line. I'm not sure whether I put it in by editing this file to change the password (CCS won't accept the password in the settings because it insists on validating it, and MediaTemple has a different host if the application is on their server, or if it's elsewhere, as CCS on my developer workstation is. So I can't validate it, and I MUST set it by hand in common.php. So either CCS itself appended this blank line during regeneration, or I inadvertently added it by using, say, WordPad to edit it. Thus, I can't speak to whether the Improved MySQL solution will work but it probably will.

I certainly hope this saves someone a lot of trouble. It took me a while to understand the database engine issue, and then find two solutions for it. And when you're trying to get something done, waiting 24 hours or more for a possibly wrong solution from CCS tech support is aggravating.
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.