mysql_config_editor set -G mysql2 -uroot -p -S /opt/mysql/data2/mysql.sock3307
mysql --login-path=mysql2
mysql_config_editor print
mysql_config_editor set -G mysql2 -uroot -p -S /opt/mysql/data2/mysql.sock3307
使用这个设置登录密码
mysql --login-path=mysql2
使用这个登录