因为项目需要,用mongo的话其余人不会用,想了下还是mysql,这次没去官网下载,直接brew install mysql,是8.0.12版本的,还是有不少问题了, 一一记录下。
brew安装的话位置在Cellar下,启动方式和以往其他cellar下的包一样,brew services start/stop/restart mysql,默认是没密码的,我按照原来的方式SET password for ‘root’@’localhost’=password(‘123456’)发现不行,然后使用navicat连接出现Authentication plugin ‘caching_sha2_password’ cannot be loaded: 这个错误。
修改密码问题使用mysqladmin -u root -p password 123456即可,然后navicat连接不上问题是新版加密方式client不支持。
- select user, host, plugin, authentication_string from user/G;
- ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘123456’;
然后就一切ok,mysql正常使用,navicat也能连接上去。接下来继续写爬虫。
]]>