MySQL 5.5.9 logging in issue

MySQL 5.5.9 logging in issue, a forum discussion on Jojo CMS. Join us for more discussions on MySQL 5.5.9 logging in issue on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
Jaijaz Jaijaz

26 Aug 2011
Posts: 215

So I have been doing a little playing on my local MAMP server which is running MySQL 5.5.9 and was getting frustrated with the fact that Jojo wouldn't log me in. After a lot of debugging I have isolated that the issue is with the Jojo_Auth_Local->authenticate() method. The database call that essentially has the SQL query:

SELECT * FROM `user` WHERE us_login = 'admin' AND (us_password = SHA1(CONCAT('password', us_salt)) OR us_password = MD5(CONCAT('password', us_salt))) AND us_locked = 0;

Throws an error:

#1267 - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

Does anyone have any experience with this? I can't seem to find any answers.
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

26 Aug 2011
Posts: 215

Changing the table to latin1_swedish_ci instead of urf8_general_ci stops the error for the Jojo::selectRow function. Though not for the Jojo::selectQuery function.

But using standard selectRow in the Jojo_Auth_Local->authenticate() is still not returning any data.

Interestingly if you substitute in the salt in instead of having the us_salt field in there it works.
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

26 Aug 2011
Posts: 215

Last update for the night. Downgraded MAMP to a version that uses MySQL 5.1.x and everything magically started working.
If you not living on the edge you taking up too much space.
Jaijaz Jaijaz

10 Oct 2011
Posts: 215

Just posting an update to this for my own benefit and record as much as anything. The problem seems to be not the version of MySQL but the Collation of the table. If the user table's Collation is set to latin1_swedish_ci (as my MAMP install defaults to) then it doesn't work. Changing it to utf8_general_ci fixes the problem.

I have the table Collation type to the install file of user in svn.
If you not living on the edge you taking up too much space.
tom

Developer

tom

10 Oct 2011
Posts: 379

I could have sworn we had something in the initial setup that checked and set the default collation to utf-8. Some plugins set the collation explicitly in their table setup, and some specify a field collation but most don't, so use whatever the default is.

It all further confused by the fact that the database, tables and fields can all have their own collations set.

It's quite irritating, which is why I thought we tried to nail it right at install, quite a while back... (although it doesn't help sites installed prior to that) ... maybe it got lost in the trunk/branch split.
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.