Skip to content

Instantly share code, notes, and snippets.

@joeleen-kado
Forked from CarlasHub/phpMyAdmin in Homestead
Created August 25, 2024 04:22
Show Gist options
  • Select an option

  • Save joeleen-kado/5feb3d8bfb09c59e97526e77ddacf4aa to your computer and use it in GitHub Desktop.

Select an option

Save joeleen-kado/5feb3d8bfb09c59e97526e77ddacf4aa to your computer and use it in GitHub Desktop.
How to setup phpMyAdmin in Homestead
How to setup phpMyAdmin in Homestead
By Andrews Ang / Sep 06, 2016 / IT admin, Laravel, Programming, Tutorial, Web
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment