Menu

#4514 controluser cannot connect to MySQL using REQUIRE SSL

4.2.6
open
nobody
None
Normal
2015-02-15
2014-08-14
Justin
No

Running 4.2.6. When I set the GRANT option REQUIRE SSL on the controluser is fails to connect even though I have:

$cfg['Servers'][$i]['ssl'] = true;

Removing the GRANT option REQUIRE SSL returns pmacontroluser back to working.

Discussion

  • lmeurs

    lmeurs - 2014-11-12

    Did you generate server side certificates, copied some to your local dev station and referenced to them from config.inc.php as in:

    $cfg['Servers'][$i]['ssl'] = TRUE;
    $cfg['Servers'][$i]['ssl_ca'] = NULL;
    $cfg['Servers'][$i]['ssl_cert'] = '~/.ssh/client-cert.pem';
    $cfg['Servers'][$i]['ssl_key'] = '~/.ssh/client-key.pem';
    $cfg['Servers'][$i]['ssl_ca_path'] = NULL;
    $cfg['Servers'][$i]['ssl_ciphers'] = NULL;
    

    Also see http://www.howtoforge.com/managing-multiple-mysql-servers-from-one-phpmyadmin-installation-using-ssl-encryption.

    EDIT: When using REQUIRE SSL you need to enable SSL support on the remote MySQL server (see previous link). I am not sure whether you also have to generate server side certificates and configure the remote MySQL server to use them.

    When using ie. REQUIRE X509 you definitely have to generate server side certificates and configure the remote MySQL server to use them. The client needs to store the client key and cert on his local machine and reference to them from config.inc.php.

    Also see http://stackoverflow.com/a/3658591/328272 and http://dev.mysql.com/doc/refman/5.0/en/grant.html#grant-other-characteristics.

     

    Last edit: lmeurs 2014-11-13
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: 7 --> Normal