mysql RSA private key file not found
安裝mysql報錯
[Note] RSA private key file not found: /db/mysql5.6/data//private_key.pem. Some authentication plugins will not work. [Note] RSA public key file not found: /db/mysql5.6/data//public_key.pem. Some authentication plugins will not work.
解決方法如下:
1.檢查是否安裝openssl
$rpm -qa openssl openssl-1.0.0-20.el6_2.5.x86_64
2.利用openssl生成公有和私有key
$ openssl genrsa -out mykey.pem 1024Generating RSA private key, 1024 bit long modulus ..........++++++ .++++++ e is 65537 (0x10001)
$ openssl rsa -in mykey.pem -pubout -out mykey.pubwriting RSA key
3.修改key的許可權
$ chmod 400 mykey.pem$ chmod 444 mykey.pubchown mysql:mysql mykey.pemchown mysql:mysql mykey.pub
4.把公私有key的路徑加入到my.cnf中
sha256_password_private_key_path=mykey.pem sha256_password_public_key_path=mykey.pub如果key放在datadir目錄下,直接寫key名即可。否則要指定key的全路徑
5.重啟mysql
SHOW STATUS檢視Rsa_public_key狀態,如果不為空,則OK.
mysql> SHOW STATUS LIKE 'Rsa_public_key'\G*************************** 1. row ***************************Variable_name: Rsa_public_key Value: -----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEALeNX9dY4EMlaDHCIYPBvFNN NJG2f6dtsyV/IG94TFsKtx/Xobiiz9ihBZSWvUhlfz6aVy9TbN68YEn58G5oOS3o sxKZQvDF9XvjN0thDPwCgfIwTZgatqmrV/qGewCxQpQ03WHPx+GXQmM9iFSfM84F pZ8QtiI3m+fIUaOd/QIDAQAB -----END PUBLIC KEY----- 1 row in set (0.00 sec)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31559985/viewspace-2652899/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Vagrant : SSH auth method: private key
- openssl_private_encrypt(): key param is not a valid
- Newline required at end of file but not foundUI
- SSH auth method: private key 的解決方案
- Android:Unexpected lock protocol found in lock file. Expected 3, found 0.AndroidProtocol
- GitHub/GitLab配置SSH Key,以及RSA入門GithubGitlab
- More than one file was found with OS independent path
- MySQL 5.6複製報錯Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;MySqlError
- Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解決的兩種方式)Go
- 如何獲取SSL證書private key私鑰檔案
- 【Vagrant】啟動安裝Homestead卡在 SSH auth method: private key
- MySQL執行語句報Incorrect key file for table '/tmp/#sql_.MYI'; try to repair itMySqlAI
- React Native 報錯 'config.h' file not foundReact Native
- mac mysql: command not foundMacMySql
- mysql中key 、primary key 、unique key 與index區別MySqlIndex
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- Mysql Key Buffer SizeMySql
- Mac -bash: mysql: command not foundMacMySql
- Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hos
- MyIsam 表 “ Incorrect key file for table 't_ '; try to repair it”AI
- ssh 遠端登入報錯:Unable to negotiate with IP port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss 解決辦法Go
- RealmBrowser 開啟提示:please enter a valid encryption key for this realm file
- centos 7 -bash: mysql: command not foundCentOSMySql
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- 如何使用 Putty 以金鑰 private key 的方式登入騰訊雲主機
- mac php8安裝swoole 'pcre2.h' file not foundMacPHP
- private
- MySQL_插入更新 ON DUPLICATE KEY UPDATEMySql
- MySQL insert on duplicate key update 死鎖MySql
- mysql-python安裝時Environment Error: mysql_config not foundMySqlPythonError
- 解決bash: mysql: command not found的問題MySql
- 安裝mysqlclient報OSError: mysql_config not foundMySqlclientError
- python (3.x) 實現RSA 加簽 驗籤 以及key的序列化Python
- mysql中出現Unit mysql.service could not be found 的解決方法MySql
- 【YashanDB資料庫】自關聯外來鍵插入資料時報錯:YAS-02033 foreign key constraint violated parent key not found資料庫AI
- go呼叫python報錯pkg-config: exec: "pkg-config": executable file not found in %PATH%GoPython
- Mac: ‘SDL2/SDL_events.h‘ file not found解決方案及demo示例Mac
- MySQL explain 中 key_len的詳解MySqlAI