How do I set up phpMyAdmin on a Laravel Homestead box?

前端 未结 14 1273
无人共我
无人共我 2020-12-12 09:48

I installed it by running sudo apt-get install phpymyadmin and then running

sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html and

相关标签:
14条回答
  • 2020-12-12 09:56

    Option 1:

    This will install the latest version of PhpMyAdmin from a shell script I've written. You are welcome to check it out on Github.

    1. Run the following command from your code/projects directory:

      curl -sS https://raw.githubusercontent.com/grrnikos/pma/master/pma.sh | sh
      

    Option 2:

    This will install PhpMyAdmin (not the latest version) from Ubuntu's repositories. Assuming that your projects live in /home/vagrant/Code :

    1. sudo apt-get install phpmyadmin Do not select apache2 nor lighttpd when prompted. Just hit tab and enter.

    2. sudo ln -s /usr/share/phpmyadmin/ /home/vagrant/code/phpmyadmin

    3. cd ~/Code && serve phpmyadmin.test /home/vagrant/code/phpmyadmin

    Note: If you encounter issues creating the symbolic link on step 2, try the first option or see Lyndon Watkins' answer below.

    Final steps:

    1. Open the /etc/hosts file on your main machine and add:

      127.0.0.1  phpmyadmin.test
      
    2. Go to http://phpmyadmin.test:8000

    0 讨论(0)
  • 2020-12-12 09:59

    adminer index file is located in adminer/adminer so try :

    serve adminer.app /home/vagrant/Code/adminer/adminer
    
    0 讨论(0)
  • 2020-12-12 10:00

    I installed phpMyAdmin from here

    then put these settings in config.inc.php:

    /* Server parameters */
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['port'] = '33060';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    

    and opened via Apache (I had a xampp). In my case i placed phpMyAdmin in D:\xampp\htdocs\pma which allowed me to open at localhost/pma url.

    Everything worked!

    0 讨论(0)
  • 2020-12-12 10:03

    Finally it worked for me, few things I had to fix:

    Homestead.yaml file:

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

    I had to delete /public from the end. I installed phpmyadmin (after vagrant ssh command from Homestead directory) into the 'code' folder where the other projects are. When 'code' is with lowercase, it has to be everywhere so (or other way around): folder name, yaml file or even after installation performing these commands:

    sudo ln -s /usr/share/phpmyadmin/ /home/vagrant/code/phpmyadmin
    cd ~/code && serve phpmyadmin.test /home/vagrant/code/phpmyadmin
    
    0 讨论(0)
  • 2020-12-12 10:05

    A variation on Nikos Gr's answer that seemed a bit simpler (in that it doesn't require a new symbolic link for each project on your Homestead box) and worked for me.

    1. Inside the Homestead box, run sudo apt-get install phpmyadmin. Don't select any of the options during install.
    2. On your host machine, add the following lines to your Homestead.yaml file:

      - map: phpmyadmin.dev to: /usr/share/phpmyadmin

    3. On your host machine, add the following line to your hosts file:

      192.168.10.10 phpmyadmin.dev

    ...and Homestead's phpMyAdmin will be available at phpmyadmin.dev

    0 讨论(0)
  • 2020-12-12 10:06

    This is the most simple solution. No mapping and all needed.

    1. Download latest phpmyadmin version from here https://www.phpmyadmin.net/downloads

    2. Make a folder named phpmyadmin inside your main root/public folder and unzip phpmyadmin here.

    3. Run yourwebsite.com/phpmyadmin

    0 讨论(0)
提交回复
热议问题