MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
         
23
24 25 26 27 28 29 30
2024
Months
NovDec


Sat, Apr 01, 2017 6:14 pm

Can't log into phpMyAdmin

I was unable to log into phpMyAdmin from Firefox. Every time I entered the user name and password, I would be presented with the login screen again. I was able to resolve the problem by removing the coookies for the site on which phpMyAdmin was running from within Firefox 52.0 by the following process:
  1. Click on the menu button at the top, right-hand corner of the Firefox window - the one that has 3 horizontal bars - and select Options.
  2. Select Privacy.
  3. Click on the link under History for "remove individual cookies".
  4. Click on the site on which phpMyAdmin is running to select that site, then click on Remove Selected. Don't click on Remove All or you will remove cookies for all sites.

    Firefox - Removed Selected Cookies

  5. Click on Close to close the cookies list window.

[/network/web/tools/phpmyadmin] permanent link

Sat, Jun 27, 2015 8:13 pm

You don't have permission to access /phpmyadmin on this server

When I tried to access phpMyAdmin on a CentOS 7 system running Apache web server software, I saw the message below:

Forbidden

You don't have permission to access /phpmyadmin on this server.

I looked for phpmyadmin.conf, but couldn't find it on the system, but then realized that I needed to use an uppercase "M" and "A"

# locate phpmyadmin.conf
# locate phpMyAdmin.conf
/etc/httpd/conf.d/phpMyAdmin.conf

I thought I had allowed access from all internal systems on the same LAN to phpMyAdmin on the webserver by modifying phpMyAdmin.conf to allow access from the subnet on which the internal systems resided. I checked the configuration file again and it appeared I had allowed access there.

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1 192.168.0
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1 192.168.0
     Allow from ::1
   </IfModule>
</Directory>

Since the internal systems were on a 192.168.0.0/24 subnet, I had added 192.168.0 previously to the Require IP and Allow from lines, so that access was allowed both from the localhost address, 127.0.0.1, i.e., from the system itself, and from other systems on the LAN. I knew I had done that quite some time ago and that the Apache webserver had been restarted a number of times subsequent to that change.

I checked the IP address the server was seeing for the system from which I had tried accessing it using http://www.example.com/phpMyAdmin and realized it was seeing the external IP address of the firewall behind which the webserver resides, because I had used the fully qualified domain name (FQDN) for the server, i.e., www.example.com, which caused the connectivity from the internal system to the web server to go out through the firewall and back in. When I used the internal IP address for the webserver on which phpMyAdmin resided with http://192.168.0.22/phpMyAdmin, I was able to access the phpMyAdmin interface from an internal system on the LAN on which it resides.

References:

  1. Installing phpMyAdmin on a CentOS System Running Apache
    Date: August 8, 2010
    MoonPoint Support

[/network/web/tools/phpmyadmin] permanent link

Mon, Feb 16, 2015 9:26 pm

phpMyAdmin 4.3.6 on CentOS 7

When I tried accessing phpmyadmin on a CentOS 7 server running the Apache webserver software using http://example.com/phpmyadmin, I received the message below:

Forbidden

You don't have permission to access /phpmyadmin on this server.

I got the same error if I tried using the IP address of the system instead of example.com.

I could see the phpMyAdmin files on the system in /usr/share/phpMyAdmin and the rpm command showed the package for it was installed on the system.

# rpm -qa | grep Admin
phpMyAdmin-4.3.6-1.el7.noarch

And when I logged into the web server, opened a browser, and pointed it to http://localhost/phpmyadmin, I was able to get the phpMyAdmin login prompt. I could also get to the setup page at http://localhost/phpmyadmin/setup. I still received the "forbidden" error message if I tried the IP address of the system in the address bar of the browser while logged into the system, though.

I encountered the same error message about 4 years ago as noted in Installing phpMyAdmin on a CentOS System Running Apache. In that case my notes indicated I edited the phpmyadmin.conf file to add access from an additional IP address. But when I looked for a phpadmin.conf file on the current system, there was none to be found. After a little further investigation, though, I found I should have been looking for phpMyAdmin.conf rather than phpmyadmin.conf. I.e., I needed to look for a file with a capital "M" and "A" in the file name.

# locate phpMyAdmin.conf
/etc/httpd/conf.d/phpMyAdmin.conf

I then added 192.168 after the instances of the localhost address, 127.0.0.1, in the Directory /usr/share/phpMyAdmin/ section of /etc/httpd/conf.d/phpMyAdmin.conf as shown below, since the other systems on the LAN had addresses in the 192.168.xxx.xxx range, so I could access phpMyAdmin from any other system on the LAN.

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1 192.168
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1 192.168
     Allow from ::1
   </IfModule>
</Directory>

I then restarted the Apache web server software by running apachectl restart from the root account. I was then able to access phpMyAdmin using the internal IP address of the system, e.g., http://192.168.0.5/phpmyadmin, though http://example.com/phpmyadmin didn't work because even though I was trying to access the server from a system on the same LAN by using the fully qualified domain name (FQDN), I was then accessing the system by the external address on the outside of the firewall/router it sits behind. But, in this case, accessing it by IP address was sufficient.

[/network/web/tools/phpmyadmin] permanent link

Sat, Aug 02, 2014 10:38 pm

phpMyAdmin SQL History

If you need to see a recent history of SQL commands you've run inside phpMyAdmin, you can see recently entered commands by clicking on the SQL icon, which is a box with "SQL" in red letters within it, that occurs just below "phpMyAdmin" at the upper, left-hand side of the phpMyAdmin window.

phpMyAdmin SQL icon

Once you click on that icon, another small window will pop up which contains a tab labeled SQL history.

phpMyAdmin SQL history tab

Click on that tab to see the recently entered SQL commands

[/network/web/tools/phpmyadmin] permanent link

Sun, Aug 08, 2010 5:36 pm

Installing phpMyAdmin on a CentOS System Running Apache

To install phpMyAdmin on a CentOS system running an Apache webserver, login as root and issue the command yum install phpmyadmin from a command prompt.

Note: you may have to install the Remi Repository or the RPMForge Repository to be able to locate and install phpMyAdmin. Instructions for configuring yum to use one of those repositories can be found via the links below.

Remi Repository
RPMForge Repository

After installing the software you will need to restart Apache, which you can do with apachectl restart or service httpd restart . You can then try accessing phpMyAdmin by http://example.com/phpmyadmin substituting your domain name or IP address for example.com.

If you receive a "403 Forbidden" error with the message "You don't have permission to access /phpmyadmin on this server.", it is likely because you are attempting to access the software from outside of the server itself. The orginal phpmyadmin.conf file contains the lines below:

#
#  Web application to manage MySQL
#

<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1
</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

The Deny from all line states that the default behavior is to prevent any IP address from accessing phpMyAdmin. The next line, Allow from 127.0.0.1 provides for the exception of accessing the software from the server itself, i.e., the "localhost" address 127.0.0.1. You could change the "deny from all" to "allow from all" to allow access from anywhere or put a "#" at the beginning of the line to comment it out. Or, you could add additional IP addresses or FQDN's after the 127.0.0.1 to allow access to phpMyAdmin from other systems. E.g. you could change the line to Allow from 127.0.0.1 192.168 to also allow access from any IP address beginning with 192.168. Restart Apache again.

If you then try accessing phpMyAdmin, e.g., you might use http://192.168.0.10/phpmyadmin, if 192.168.0.10 was your webserver's IP address, but get the error message The configuration file now needs a secret passphrase (blowfish_secret). then you need to edit /usr/share/phpmyadmin/config.inc.php. Look for the following lines:

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

Place a password between the two single quotes, e.g., you could have a password of SomeGoodPassword with the following:

$cfg['blowfish_secret'] = 'SomeGoodPassword';

If you refresh the webpage, you should then see a phpMyAdmin login window where you are prompted to enter a username and password, which should be the mysql root account and it's password.

For further information on phpMyAdmin and MySQL, there is a book by Marc Delisle, Mastering phpMyAdmin for Effective MySQL Management.

References:

  1. phpMyAdmin
  2. RPMForge Packages and Yum Priorites
    Date: May 3, 2008
    MoonPoint Support
  3. Remi Repository
    Antoine Solutions Development A Free PHP IDE built on Open Source Software
  4. Quick 'n' Easy LAMP Server For CentOS/RHEL
    By: olddocks
    Date: May 28, 2008
    HowtoForge - Linux Howtos and Tutorials

[/network/web/tools/phpmyadmin] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo