access database in virtual host

July 2, 2015 1.4k views
Apache PHP

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 ??

  • 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.

1 Answer
Have another answer? Share your knowledge.