Table of contents
- 1. How to enable phpMyAdmin or phpPgAdmin to be accessed remotely?
- 2. Increasing the security of phpMyAdmin and phpPgAdmin's login pages.
- 3. How to modify the allowed size for uploaded files?
- 4. How to modify the execution time?
- 5. How to change the phpMyAdmin or phpPgAdmin password?
- 5.1. Legacy versions
- 1. How to enable phpMyAdmin or phpPgAdmin to be accessed remotely?
- 2. Increasing the security of phpMyAdmin and phpPgAdmin's login pages.
- 3. How to modify the allowed size for uploaded files?
- 4. How to modify the execution time?
- 5. How to change the phpMyAdmin or phpPgAdmin password?
- 5.1. Legacy versions
This sections describes how to access your phpMyAdmin and phpPgAdmin installation.
phpMyAdmin is an easy to use management tool for MySQL that allows you to create and drop databases, create, drop and modify tables, delete, edit and add fields, execute SQL statements, manage keys on fields, manage privileges and export data in various formats through a web-based interface.
phpPgAdmin is a web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies and hosting services.
How to enable phpMyAdmin or phpPgAdmin to be accessed remotely?
For security reasons, these applications will be accessible only when using 127.0.0.1 as the hostname. If you are using a native installer you can access from your own machine but if you are using a Virtual Machine, Amazon cloud image or Windows Azure cloud image, please check the connection steps below.
$ cd your_installdir $ ./ctlscript.sh status
If you need to start or stop the servers, you just have to follow the steps described here.
You can access your phpMyAdmin installation by opening a browser and typing http://127.0.0.1:8080/phpmyadmin or http://127.0.0.1/phpmyadmin. And to access phpPgAdmin, you can type the following urls instead: http://127.0.0.1:8080/phppgadmin or http://127.0.0.1/phppgadmin
For phpMyAdmin the default root user is root, and for phpPgAdmin the default database root user is postgres. The password is the same that you set during the installation.
If you are running the Virtual Appliance in a secure environment, you can enable it by editing the "installdir/apps/phpmyadmin/conf/phpmyadmin.conf" file and replace "Allow from 127.0.0.1" with "Allow from all" (if your server is running Apache 2.2) or "Require local" with "Require all granted" (if you server is running Apache 2.4 or later) :
Alias /phpmyadmin "/installdir/apps/phpmyadmin/htdocs" <Directory "/installdir/apps/phpmyadmin/htdocs"> # AuthType Basic # AuthName phpMyAdmin # AuthUserFile "/installdir/apache2/users" # Require valid-user <IfVersion < 2.3 > Order allow,deny Allow from all Satisfy all </IfVersion> <IfVersion >= 2.3> Require all granted </IfVersion> ErrorDocument 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname" </Directory>
Then you should restart Apache to load the changes:
$ cd installdir $ ./ctlscript.sh restart apache
Then you can access at the same URL with "/phpmyadmin" or "/phppgadmin", for example http://YOUR_IP/phpmyadmin
For phpMyAdmin the default root user is root, and for phpPgAdmin the default database root user is postgres. For Virtual Appliances the password is "bitnami" (or "bitnami1" in the Magento case)
By default phpMyAdmin and phpPgAdmin are not accessible from the outside for security reasons. In order to access them, you can create an SSH tunnel to Apache, sending your requests to your webserver from 127.0.0.1 (localhost).
You should follow these steps to create the tunnel:
1. Get your SSH private key if you don't have it already. More info
2. Create the tunnel.
- If you are in Linux or Mac you can run the following in a console in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):
$ ssh -N -L 8888:127.0.0.1:80 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
- If you are using Windows, you can use Putty:
- Follow the steps described here
- Before opening the connection. Go to Connection -> SSH -> Tunnels, enter the values below and click "Add" button:
- Source port: "8888"
- Destination: "localhost:80"
- Click Open
3. While the tunnel is active you can connect to the web application at http://127.0.0.1:8888/phpmyadmin or http://127.0.0.1:8888/phppgadmin in your browser. The default login is:
- username: root ("administrator" for legacy versions) for MySQL or postgres for PostgreSQL database.
- password: bitnami (for BitNami AMIs), <application password> (for BitNami Cloud Hosting)
Take a look at this link about how to get your application password for BCH servers
By default phpMyAdmin and phpPgAdmin are not accessible from the outside for security reasons. In order to access them, you can create an SSH tunnel to Apache, sending your requests to your webserver from 127.0.0.1 (localhost).
You should follow these steps to create the tunnel:
1. Create the tunnel.
- If you are in Linux or Mac you can run the following in a console in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):
$ ssh -N -L 8888:127.0.0.1:80 your_azure_user@xxx.cloudapp.com
- If you are using Windows, you can use Putty:
- Follow the steps described here
- Before opening the connection. Go to Connection -> SSH -> Tunnels, enter the values below and click "Add" button:
- Source port: "8888"
- Destination: "localhost:80"
- Click Open
2. While the tunnel is active you can connect to the web application at http://127.0.0.1:8888/phpmyadmin or http://127.0.0.1:8888/phppgadmin in your browser. The default login is:
- username: root for MySQL or postgres for PostgreSQL database.
- password: bitnami (for BitNami Azure images) or bitnami1 in the Magento case.
Increasing the security of phpMyAdmin and phpPgAdmin's login pages.
$ sudo nano /opt/bitnami/apps/phpmyadmin/conf/phpmyadmin.conf
# AuthType Basic # AuthName phpMyAdmin # AuthUserFile "install_directory/apache2/users" # Require valid-user
# AuthType Basic # AuthName phpPgAdmin # AuthUserFile "install_directory/apache2/users" # Require valid-user
How to modify the allowed size for uploaded files?
You can modify the following option in the php.ini file to increase the allowed size for uploads:
; Maximum size of POST data that PHP will accept. post_max_size = 16M ... ; Maximum allowed size for uploaded files. upload_max_filesize = 16M
How to modify the execution time?
This paremeter sets the timeout for Apache to run a script. You can modify the following option in the php.ini file.
max_execution_time = 120 ; Maximum execution time of each script, in seconds
How to change the phpMyAdmin or phpPgAdmin password?
The phpMyAdmin and phpPgAdmin credentials are the same that the MySQL and PostgreSQL database respectively. If you want to modify the password, check how to change the MySQL root password or how to change the PostgreSQL password.
Legacy versions
The phpMyAdmin application can be protected by an Apache directory password for security reasons. You can change the phpMyAdmin access password using the following command:
$ sudo /installdir/apache2/bin/htpasswd -cb /installdir/apache2/users administrator <new_phpmyadmin_password>


Comments