Question

access database in virtual host

Posted July 2, 2015 4.5k views
ApachePHP

i have apache virtual hosts setup and wordpress one click install. wordpress site works fine and on the other site i want to upload a site which needs a database (phpmyadmin) to work. how do i connect to the database. i have installed phpmyadmin but when i try to access it through the ip address(wordpress site)
xxxxxxxx/phpmyadmin i get Oops! That page can’t be found. do i need a separate instance of phpmyadmin?? or ??

3 comments
  • phpmyadmin should work on all domains you have on the droplet. You might need to reload apache if you just installed it:

    sudo service apache2 reload
    
  • Yeah, like @sierracircle mentioned you have a single MySQL installation running and phpMyAdmin accesses this installation. WordPress uses certain databases/tables, but nothing is stopping you from creating new databases/tables to work with for another project.

    And I would highly recommend also creating a new MySQL user so in a worst case scenario, if WordPress is compromised, the MySQL user it uses (eg. root) won’t have access to every other database/table on your droplet.

    See this tutorial for more info: How To Install and Secure phpMyAdmin on Ubuntu 14.04

    by Justin Ellingwood
    While many users require access to a database management system like MySQL, not all users feel comfortable interacting with the MySQL prompt on a daily basis. In this guide, we'll discuss how to install and secure phpMyAdmin, a web management interface for MySQL, on an Ubuntu 14.04 server.
  • i get the same problem, I can’t even create another database without getting into phpmyadmin first.

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.

×
1 answer

Hi @dwaynepatel,

Did you follow the article @sierracircle has mentioned, it should fully resolve the issues you are having.

As mentioned by @sierracircle phpMyAdmin can be used to managed every mysql not only one. For this, you’ll need to use root.

Regards,
KDSys

Submit an Answer