By raffanello
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 (domain.com/phpmyadmin) 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]
</Directory>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Problem solved, <br>It was an incredibly stupid oversight. <br>You can forget this question
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.