Hello all,
I’m a complete noob but I can follow instructions quite well… :) I was following the article on how the install and secure the phpmyadmin installation on Ubuntu until I hit an error: When I run the command sudo htpasswd -c /home/myusername/passwd/.htpasswd username I get error “cannot create file /home/myusername/passwd/.htpasswd” I double checked the .htaccess file and the AuthUserFile matches the path above. In the .htaccess file what I have is: AuthUserFile /home/myusername/passwd/.htpasswd As far as I can see the paths are identical. I’d appreciate your help on this as I cannot figure this out.
Thank you in advance, Goran
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!
Solved it. <br>For some reason it would not let me put the .htpasswd file in /home/myusername/passwd/.htpasswd but it let me put it in /home/myusername/.htpasswd
You should not use phpmyadmin on a production server. Phpmyadmin makes only sense when you have a shared hosting plan which does not allow you to login via ssh to access the database. On your own server, where you can login with ssh, there is no need at all to use and install phpmyadmin. Using phpmyadmin is a big security risk, since due to misconfiguration of your webserver your database and all user credidentials are wide open to any attacker. And attacks against phpmyadmin are on the top of the list of each hacker, who comes along your website.
BTW: I hope you access/allow phpmyadmin only via https, otherwise securing it via a password (.htpasswd) is pointless.
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.