mysql ssl rsa setup,mysql_ssl_rsa_setup在哪里可以获取OpenSSL文件?

Getting "openssl not installed on this system" when running mysql_ssl_rsa_setup.

I installed openssl and mysql from source, both times keeping the default paths for installation (/usr/local/openssl for openssl [I actually renamed it to openssl from ssl to see if that was the problem], /usr/local/mysql for mysql).

The docs say it gets the path from the PATH environment variable, but there's no option to specify it in the command line. What is the default? How to change it? I have seen that you can modify /etc/environment to add PATH there, but the file is empty by default.

解决方案

According to 4.4.5 mysql_ssl_rsa_setup — Create SSL/RSA Files, mysql_ssl_rsa_setup uses the openssl command line tool:

Note

mysql_ssl_rsa_setup uses the openssl command, so its use is contingent

on having OpenSSL installed on your machine.

What is the default?

OpenSSL's default installation location is /usr/local/ssl

How to change it?

Use --openssldir when you configure the library. Also see Compilation and Installation on the OpenSSL wiki.

You should not install OpenSSL in /usr/bin (and the libraries in /usr/lib). Its creates too many problems.

Instead, let the library install itself in /usr/local/ssl. Then you should be able to create a shell script located at /usr/local/bin/openssl that performs the following:

$ cat /usr/local/bin/openssl

#!/usr/bin/env bash

LD_LIBRARY_PATH=/usr/local/ssl/lib:$LD_LIBRARY_PATH; /usr/local/ssl/bin/openssl "$@"

Be sure to chmod a+x /usr/local/bin/openssl.

You can verify the OpenSSL tool being used with:

$ which openssl

/usr/local/bin/openssl

If needed, add /usr/local/bin to your PATH:

$ cat ~/.bash_profile

export PS1="\\h:\\W$ "

export UMASK=0022

export EDITOR=emacs

export PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值