How to set up and use phpMyAdmin with Laravel Valet

Assume we already have Valet and MySQL on our machine. What if we want to access our databases through a graphical user interface like phpMyAdmin without running a whole platform like XAMPP or MAMP?

Install PhpMyAdmin

brew install phpmyadmin

Go to phpMyAdmin’s directory and link as a Valet site

cd /usr/local/share/phpmyadmin
valet link pma

In the snippet above, I linked the directory as pma, make sure Valet is started, then we can access the site at pma.vl (my Valet domain is set to vl).

Configure phpMyAdmin

By default phpMyAdmin does not allow login with a blank password, therefore we cannot login with MySQL default root user. To disable this, open the file and find the line that has AllowNoPassword, uncomment and set it to true.

$cfg['Servers'][$i]['AllowNoPassword'] = true;

Login again and enjoy!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s