Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set up phpMyAdmin on a Laravel Homestead box?

I installed it by running sudo apt-get install phpymyadmin and then running

sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html and sudo service nginx restart

but it's not working.

Note: I didn't select any of the apache2 or lighttpd options when installing.

like image 667
Nikos Grigoriadis Avatar asked May 21 '14 15:05

Nikos Grigoriadis


People also ask

Can you use phpMyAdmin with laravel?

Forum how to connect my laravel project with phpmyadminYou can connect your database using . env file present in the root folder of laravel installation. Just put your database credentials (DB name, username, password) there.

How do I start phpMyAdmin?

Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you've setup in MySQL. If no users have been setup, use admin with no password to login. Then select Apache 2 for the webserver you wish to configure.


1 Answers

Option 1:

This will install the latest version of PhpMyAdmin from a shell script I've written. You are welcome to check it out on Github.

  1. Run the following command from your code/projects directory:

     curl -sS https://raw.githubusercontent.com/grrnikos/pma/master/pma.sh | bash 

Option 2:

This will install PhpMyAdmin (not the latest version) from Ubuntu's repositories. Assuming that your projects live in /home/vagrant/Code :

  1. sudo apt-get install phpmyadmin Do not select apache2 nor lighttpd when prompted. Just hit tab and enter.

  2. sudo ln -s /usr/share/phpmyadmin/ /home/vagrant/code/phpmyadmin

  3. cd ~/Code && serve phpmyadmin.test /home/vagrant/code/phpmyadmin

Note: If you encounter issues creating the symbolic link on step 2, try the first option or see Lyndon Watkins' answer below.

Final steps:

  1. Open the /etc/hosts file on your main machine and add:

     127.0.0.1  phpmyadmin.test 
  2. Go to http://phpmyadmin.test:8000

like image 95
Nikos Grigoriadis Avatar answered Oct 07 '22 14:10

Nikos Grigoriadis