简体   繁体   中英

Installing older version of MySQL brew error

I'm a little frustrated at this point, so I had to come for aid to stackoverflow lol I've been stuck trying to setup the dev environment for 3h...

This is what's happening, the new version of mysql doesn't support compatible client-side authentication mechanisms for the new server plugin. More info here

So at this point I had MySQL installed with version 8.0 and I'm trying to revert it back to 5.7 because none of my node.js projects work locally.

Now, I followed this to uninstall MySQL completely. and this to install multi version with the difference of instead of writing mysql56 I wrote mysql@5.7 because homebrew/versions/ is deprecated.

So... once I do that I go to the terminal and check: sudo mysql -v and I get this: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

That is if I remove the current agent (the new version 8.0), if I add it back:

# Start agent for current version of mysql (including on login)
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

then it would show me this: 在此处输入图片说明

The older version which is the one I want is already linked: brew link --force mysql@5.7

now... here is the funny thing, when I type: mysql --version it says: mysql Ver 14.14 Distrib 5.7.23, for osx10.13 (x86_64) using EditLine wrapper

And when I go to my node.js env. to run a query or something, it says: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client which is the problem mentioned on the other posts about MySQL versioning.

Can someone lend me a hand please. Thanks guys

Brew was suppoused to give me a nice and quick way to install that version, but I ended up even forgeting what I was developing to troubleshoot MySQL... So I decided to go to the oracle page and download it from there. I made a guide, in case another person has the same problem, to read it go here .

If someone has time and wants to have some fun with brew let me know what's the fix for that :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM