Posts Tagged ‘nginx laravel homestead’

Connecting to your Homestead Laravel 5.1 VM with your trusty phpMyAdmin

Monday, June 15th, 2015

Suppose your developing with the php Laravel 5.1 framework for Nginx, and for that your using a vagrant VirtualBox virtual machine for Nginx.

Homestead/Vagrant is easy. You can follow this great set-up.

Laravel 5 uses database migration and has support for database factories. But still sometimes you wanna use your trusty phpMyAdmin for database management on the VM. Of course you can take the time and install phpMyAdmin on your new virtual machine, but I’m gonna give you a faster tip.

Why don’t you use your phpMyAdmin on your local server to manage the database on the VM.

For that edit the phpMyAdmin config file

vi /etc/phpmyadmin/config.inc.php

and add this after $i++

$i++
  $cfg['Servers'][$i]['host'] = '127.0.0.1'; //provide hostname and port if other than default
    $cfg['Servers'][$i]['port'] = '33060';      //user name for your remote server
    $cfg['Servers'][$i]['user'] = 'homestead';  //user name for your remote server
    $cfg['Servers'][$i]['password'] = 'secret';  //password
    $cfg['Servers'][$i]['auth_type'] = 'config';       // keep it as config

Now you can select the VM database in phpMyAdmin in the current server select field.

Neat.

Categories
Archives
Links