How to add phpMyAdmin to Laravel Homestead

Laravel Homestead, by default, doesn’t have phpMyAdmin. They also do not have it as an optional installation. Due to this, we will add phpMyAdmin to our homestead installations.

I am using Ubuntu 20.04 in this tutorial, so some commands may be different for you.

The first step would be to get phpMyAdmin.

We need to head to the phpMyAdmin downloads page.

As of this writing, the latest version of phpMyAdmin is 5.1.0, so we’ll need to download it. I will be using wget, but you can download this using your browser as well. I will be getting the English only version, as I only need english.

wget phpMyAdmin-5.1.0-english.zipmv phpMyAdmin-5.1.0-english phpmyadminrm

now that we have phpmyadmin unzipped into our homestead folder, we’ll need to map the folder as well as the site in our homestead.yaml

map: /home/users/elijah/homestead/phpmyadmin
to: /home/vagrant/phpmyadmin

map: phpmyadmin.test
to: /home/vagrant/phpmyadmin

We will now need to make sure to reload our homestead box.

vagrant reload --provision

Then I will be adding phpmyadmin.test in my /etc/hosts file. Because I set the IP for my homestead box to use as, that’s the IP I will be using.

... homestead.test myproject.test anotherproject.test phpmyadmin.test

Now that we’ve completed that, we will need to do one last thing before we actually can use phpMyAdmin without error. We need to head to phpmyadmin.test/setup in order to quickly create a to make things easier. Head to the setup, and click on new server.

Click on new server.

You won’t have to change any settings, just click apply.

After you do that, just click Display, then copy the text you recieve.

Then, head to the root of your phpMyAdmin installation and paste the text you recived in a new file called which you’ll need to make sure you don’t get any non setup errors. Or, you can just copy the text below to that file.

cd ~/homestead/phpmyadmin
* Generated configuration file
* Generated by: phpMyAdmin 5.1.0 setup script
* Date: Sat, 24 Apr 2021 18:57:44 +0000
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* End of servers configuration */$cfg['blowfish_secret'] = 'pg~Ydp`25!tg*8}R^=/"Q\'/|&`$6;Dx3';
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

This configuration is all you’ll need, and then you’ll be able to login using your mySQL credentials.




Owner of ECWebServices

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Smart irrigation system with the help of Arduino and gsm module ( hc-05):

Tech Retrospective - What, Why & How?

Amazon Kendra — Machine Reading Comprehension

The Journey From There to Here

Migrating HDFS Data from On-Premises to Google Cloud Platform

The 2019 Microservices Ecosystem

Dapp development with a local subgraph + Ganache setup

Modify, Merge and Push It…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Elijah Cruz

Elijah Cruz

Owner of ECWebServices

More from Medium

Polycam can export to several different file formats. What are they?


Highlighting the Active Speaker using the Agora Flutter SDK

Deploying Laravel 8 on Apache & Ubuntu 20.04 LTS with extra security (Modsecurity and Fail2ban)