Logo Linux Bash SSH Ubuntu Git Menu
 

phpmyadmin port change? [closed]

Tags:

linux

port

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

http://<webserver>:9999/phpmyadmin/

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?

like image 271
Rajat Avatar asked May 05 '26 18:05

Rajat


3 Answers

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

$cfg['ForceSSL'] = FALSE; // whether to force using https 
like image 199
The Digital Ninja Avatar answered May 08 '26 15:05

The Digital Ninja


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/';
like image 25
Michael Hampton Avatar answered May 08 '26 14:05

Michael Hampton


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.

like image 30
GioMac Avatar answered May 08 '26 14:05

GioMac