Yii Framework Forum

yii\db\Exception error when trying to login through yii2-app-advanced backend


(SomebodyHere) #1

OK, so I’m new to yii2 and php frameworks in general and I’m trying to test out the advanced package (I already worked a bit with the basic one).

I tried logging in through backend/web/index.php and I keep getting errors. I already fixed several, but I don’t understand what’s up with this one:

I’m used to using MariaDB but heard that it isn’t fully compatible with yii2 so I switched to mysql - not something I’m super familiar with, so I’m wondering it that could be the problem, since it has something to do with the password SHA hashing?

I’m really confused and would appreciate any help.


(Mehdi Achour) #2

Hi and welcome to the Yii community :slight_smile:

It’s seems like you’re using MySQL V8 which changed the default authentication to sockets.

Check this SO entry: https://stackoverflow.com/a/52364450/732772

By the way, I’ve been using MariaDB with yii2 for years now, didn’t face any problems. You may want to switch back to Maria as you’ll be in a more familiar setup.


(SomebodyHere) #3

Thanks! I think I’ll stick to MariaDB like you suggested - it works totally fine now. :slight_smile: