How do i change my default phpmyadmin port to 443 or 9999? Is it possible or do I have use port 80 only? If possible, then how do I change share the same?

Apache is listening on port 9999 for sure. However, going to URL


Will give following error (with Firefox browser)

An error occurred during a connection to webserver:9999.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

Anyone has any clue what is going on?

  • Are you concerned about security (e.g. SSL) or do you just want a different port?
    – ewwhite
    Dec 9, 2012 at 5:27

4 Answers 4


edit the config.inc.php file in the phpMyAdmin directory and change the following line:

$cfg['ForceSSL'] = FALSE; // whether to force using https 
  • 1
    thanks for quick support can tell which place i have to add this line!!
    – Rajat
    Jul 15, 2010 at 15:15
  • 1
    Should be you in your config.inc.php file in the phpmyadmin directory wiki.phpmyadmin.net/pma/config.inc.php Jul 15, 2010 at 15:17
  • 1
    I don't understand how this is even related to the question. Digital Ninja: can you try to edit the question to show how this answer relates to it?!?
    – Theuni
    Dec 9, 2012 at 12:16
  • @Theuni - this triggers internal PHPMyAdmin rules that force the interface to HTTPS. Only works if you actually have HTTPS installed and configured though, but the original question is frankly so shit there's no way we would know or not. (have a look at the original edits if you want) Dec 10, 2012 at 1:11
  • This is deprecated function use PmaAbsoluteUri as mentioned by Michael Hampton
    – MaXi32
    Jan 6, 2021 at 15:06

If you want to run phpMyAdmin on a non-standard port, it should autodetect the URL and port number you've chosen in your web server configuration. Since you don't mention which web server you use, consult its documentation to see how to set up the web server to listen on a non-standard port.

If for some reason phpMyAdmin doesn't detect them correctly, you can override it by setting the PmaAbsoluteUri directive to whatever the URL should be.

(You may also combine this with the ForceSSL directive as shown in @TheDigitalNinja's answer, and any other directives you may need to use.)

For example:

$cfg['PmaAbsoluteUri'] = 'http://rajat.example.org:9999/phpMyAdmin/';

It doesn't depend on phpMyAdmin at all and it's not required to know it's absolute url.

You need to change port on webserver side.


You can't do that. Phpmyadmin is a collection of phpscripts that run at the WEB-Server. Phpmyadmin does not use ports. Web-server does. You should go to your webserver configuration and change the default port there.

Not the answer you're looking for? Browse other questions tagged or ask your own question.