mysql 由于brew升级而导致的某些文件加载不出来使数据库无法用的解决方案

博客背景

如果不是无聊,谁又会来写博客……(最近沉迷某手游 月圆之夜、、、 感觉真好玩

问题描述

此博客解决的是macOS由于brew升级而导致的原来的MariaDB无法使用并产生下边这样报错的情况

$ mysql


dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/mysql
  Reason: image not found
Abort trap: 6

mysql无法使用,报错依赖没有加载出来,经过搜索发现可能是由于brew升级而使某些文件加载不出来了,这样mysql无法使用、连接。

解决方案

重新下载无法加载的该文件(或者直接upgrade)

$ brew remove openssl
$ brew install openssl

如果系统提示 brew reinstall [email protected],执行就好

最后解决问题~

$ mysql



Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.4.6-MariaDB Homebrew

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

2020.1.30
过两天又回来了,上次解决这个问题的时候有用到一个flush privileges,当时就感觉改错了什么,果然,今天再打开navicat然后本地localhost就连接不上了,关掉系统代理还是不行,,,

但是好像也不是root的权限的问题,貌似是密码不对,最后改一下密码就OK了。

->set password for root@localhost = password('');
发布了95 篇原创文章 · 获赞 19 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43345204/article/details/104095741