Skip to content

Instantly share code, notes, and snippets.

@AmrSoliman
Last active August 29, 2015 14:14
Show Gist options
  • Save AmrSoliman/30eb58ad163a33ffeb5b to your computer and use it in GitHub Desktop.
Save AmrSoliman/30eb58ad163a33ffeb5b to your computer and use it in GitHub Desktop.
Install and Using phpMyAdmin with Homestead box

Using phpMyAdmin with Homestead box

Once the Homestead vagrant box is installed successfully, we can add phpMyAdmin and config it to run with Nginx.

Install phpMyAdmin

  • SSH into Homestead vagrant box with vagrant ssh and type the following command:
    sudo apt-get install phpmyadmin
  • when prompted to select the Web server, select apache2 and press Enter, just to get pass it.
  • when prompted to config database for phpmyadmin with dbconfig-common, select Yes and press Enter.
  • when prompted for Password of the database's administrative user, enter secret and press Enter.
  • when prompted for MySQL application password for phpmyadmin, enter secret and press Enter.
  • when prompted for Password confirmation, enter secret again and press Enter.

Create and config site for Nginx

sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html/phpmyadmin

serve phpmyadmin.app /usr/share/nginx/html/phpmyadmin

Adding phpMyAdmin.app to hosts file

  • Run Notepad as Administrator, then open navigate to C:\Windows\System32\drivers\etc.
  • You may need to type *.* and press Enter in File name box to see it.
  • Select file hosts and click Open button.
  • Add phpmyadmin.app at the bottom of the file like so,
    127.0.0.1   phpmyadmin.app
  • Save the file and close Notepad.
  • Now use Chrome or any Web browser to navigate to http://phpmyadmin.app:8000 and you should now see phpMyAdmin login page.

Creating new User

  • Login to phpMyAdmin as root using password secret
  • Goto tab Users and create a user for your app and set privileges as you see fit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment