Writing this for my own reference. Hope it helps someone too.
Install using Ubuntu repository:
This will install phpMyAdmin from Ubuntu’s repositories. Assuming that your projects live in /home/vagrant/Code:
- On your hosting machine, open a terminal, go to your homestead folder, after “vagrant up”, enter “vagrant ssh” to ssh to your virtual machine.
- Then enter “sudo apt-get install phpmyadmin” (Do not select apache2 nor lighttpd when prompted. Just hit tab and enter.)
- You will be prompted whether to set up a database, select “OK” and when prompted for password, enter “secret”. (This is the default password for Homestead’s MySQL.)
- Now enter “sudo ln -s /usr/share/phpmyadmin/ /home/vagrant/Code/phpmyadmin”
- Finally, enter “cd ~/Code && serve phpmyadmin.app /home/vagrant/Code/phpmyadmin”
For Mac/Linux users, follow the following step to add a nice URL for phpMyAdmin.
- On your hosting machine, edit the /etc/hosts file with the command “sudo nano /etc/hosts”. I like the nano editor, feel free to use any editor.
- Add the following (you can use your virtual machine’s IP address instead of 127.0.0.1):
- 127.0.0.1 phpmyadmin.app
- If you’re using nano editor, press keys Control + o (letter o) to save the changes. Then press keys Control + x to exit the editor.
- Now open a browser.
- Go to http://phpmyadmin.app
- That’s it!
Reference:
http://stackoverflow.com/questions/23788096/how-to-setup-phpmyadmin-on-a-laravel-homestead-box