Fuxy22's avatar
Level 12

phpmyadmin install error in homestead

Anybody else getting an error when installing phpmyadmin on the terminal?

I'm getting:

mysql: [ERROR] mysql: Empty value for 'port' specified.

I'm not sure if it's dbconfig-common or the defaults changed in mysql but I'm unable to automate instalation becasuse of it now.

0 likes
7 replies
Ritmanis's avatar

Same here, I reproduced it on both Windows and Linux machines. This has been happening for the past few days. Must be an issue with the homestead box.

Ritmanis's avatar

Just to update you guys on the situation, it seems that the mysql version on the current release of Homestead (0.3.3) is bugged judging by this source: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=793188 What you can do for now is install an older version of Homestead (I have installed 0.3.0) until a new version of Homestead comes out.

vagrant box add laravel/homestead --box-version 0.3.0
noeldiaz's avatar

Weird, is there a place to define the port? I guess it would be 3306 inside the VM. I think the default install is set to listen on all IPs. Just pulled the lastest Homestead yesterday and that is how it is on mine.

I don't use phpmyadmin but I do have Adminer running on the latest homestead (https://www.adminer.org). It's only 1 php file and you are good to go. Does everything phpmyadmin does in my opinion. For everything else I use sequelpro on osx and heidisql on windows.

Fuxy22's avatar
Fuxy22
OP
Best Answer
Level 12

I ended up giving up on installing it on homestead and went with the simplest low load solution I could come up with.

Using the docker phpmyadmin package to connect to homestead.

Just do

docker run --name myadmin -d -e PMA_HOST=HOMESTEAD_IP -p 8080:80 phpmyadmin/phpmyadmin

replacing HOMESTEAD_IP with the IP or your homestead box.

Then just go to http://127.0.0.1:8080 to access it.

Then to stop it you do docker stop myadmin and to start it you do docker start myadmin

See https://hub.docker.com/r/phpmyadmin/phpmyadmin/ for more info on how to interact with the phpmyadmin docker image.

This solution has the added advantage of being able to run multiple instances of phpmyadmin connected to different servers and being able to access them by the ports you made them listen on.

awarren's avatar

Granted I'm running a Windoze 10 laptop, but all I did was map phpMyAdmin as I would any other project. It worked perfectly first go.

User@USER-LAPTOP MINGW64 ~/homestead (master)
$ vagrant -v
Vagrant 1.8.1

From the YAML:

folders:
    - map: /www/sites
      to: /home/vagrant/sites

sites:
    - map: callcenter.app
      to: /home/vagrant/sites/callcenter/public
    - map: test.app
      to: /home/vagrant/sites/test/public
    - map: phpmyadmin.app
      to: /home/vagrant/sites/phpmyadmin

databases:
    - homestead
    - test

ports:
     - send: 80
       to: 80

From phpMyAdmin config.inc.php

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = 33060;
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'homestead';
$cfg['Servers'][$i]['password'] = 'secret';
$cfg['Servers'][$i]['hide_db'] = 'information_schema|mysql|performance_schema|sys|phpmyadmin';

/* End of servers configuration */
Fuxy22's avatar
Level 12

Well yeah if you treat it like any other site install it would work but you need to configure it manually like you did.

Nothing wrong with that setup it's just that you need to update it yourself all the time instead of having docker or the ubuntu package manage do it for you.

Please or to participate in this conversation.