Setup phpMyAdmin with Laravel Valet

This article will show step by step on how to setup phpMyAdmin with Laravel Valet:

  1. Install Homebrew. Execute the following shell command in your terminal:

          
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
          
        

    If you have Homebrew already installed, update it:

          
    brew update
          
        
  2. Install composer. Execute the following shell commands in your terminal:

          
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
          
        

    Reference: Composer Command-line installation

  3. Move/rename the executable composer script to /usr/local/bin/ so that we can execute it anywhere and as plain "composer" (without the .phar):

          
    mv ~/composer.phar /usr/local/bin/composer
          
        
  4. Now lets install Laravel Valet using composer:

          
    composer global require laravel/valet
    valet install
          
        
  5. Install phpMyAdmin using Homebrew. Execute the following shell command in your terminal:

          
    brew install phpmyadmin
          
        
  6. Register phpMyAdmin path with Laravel Valet. Execute the following shell commands in your terminal:

          
    cd /usr/local/share/phpmyadmin
    valet domain test
    valet link
          
        

  7. Now you can access phpMyAdmin in your favorite browser via http://phpmyadmin.test.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.