phpmyadmin log-in not logging in after setting Rewrite Directives.

  • Posted February 26, 2014

I have phpmyadmin installed on my droplet and it was working fine until I added Rewrite Directives for my /var/www/ directory.

When I first added the directives navigating to the phpmyadmin login url ( caused an internal server error.

So I added the following Rewrite Rule:

RewriteRule ^(phpmyadmin)($|/) - [L]

and that allowed me to access the phpmyadmin log in page… But now when I try to use my phpmyadmin password it keeps giving me the “#1045 Cannot log in to the MySQL server” Even though I’m positive I’m using the correct password.

My question is whether the rewrite directives are preventing me from logging in in some way?

The directives are inside /etc/apache2/sites-available/default

<Directory /var/www/>

             RewriteEngine  on
             RewriteCond     %{request_filename}   -f
             RewriteRule      ^(phpmyadmin)($|/)   -  [L]
             RewriteRule      ^(.*)   $1   [L]
             RewriteRule      ^(([^/]*)+)(/([^/]{0.32})(/.+)?)?$     index.php?a=$1&q=$3     [L]



I have some problem how to fix it?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Problem solved, <br>It was an incredibly stupid oversight. <br>You can forget this question