是否有可能在php中使用mysql 5.6的加密CNF文件与mysqli或PDO?

Mysql 5.6 let's you created encrypted cnf files using mysql-config-editor.

I was hoping to use that for a mysql connection in php. The current script is using the mysqli library.

To be clear, this has nothing to do with connecting over SSL, simply being able to use the encrypted credential files generated by mysql-config-editor.

I am not answering your question but i am suggesting you. It isn't big deal to see the user & password from .mylogin.cnf encrypted file. You can So You can use alternative way-

If you have access to the login.cnf (like .mylogin.cnf unencrypted format) via PHP you could use parse_ini_file to open and read it.

It should allow you to put the different sections directly into an associative array.

Something like this:

$settings = parse_ini_file('/path/to/login.cnf',true);

Now you can connect to mysql by using $settings.