skip to Main Content

I recently ran into the issue where I was working on two Laravel projects: one using Docker, the other using XAMPP. I started my Docker project earlier, so I gave it access to port 3306.

When I went to implement the XAMPP project, I tried editing all the DB settings in the proper places to use the port 3308 so that it didn’t collide with my DB docker container. Problem was, now I couldn’t connect to phpMyAdmin. I was receiving errors that the settings were incorrect. So what was the solution?

2

Answers


  1. Chosen as BEST ANSWER

    The solution was to reset all of my settings to 3306, docker-compose down my Docker project, and then restart the XAMPP services. Worked like a charm.

    So I'll note a couple things:

    • It seems like phpMyAdmin assumes it has access to 3306 even if you've changed your settings in config.inc.php.
    • Unrelated to this precise problem, I discovered that XAMPP's PHP version was different than what was installed on my Windows machine, which meant that I had two php.ini files. My php-cli was using the C/Program Files/PHP/php.ini, whereas XAMPP was using the XAMPP php.ini. While the XAMPP php.ini had the correct extensions uncommented, I needed to manually uncomment the appropriate extensions in the php-cli ini file. If you have xampp, go to the command line and use php --ini to check where your CLI ini file is located.

  2. I suggest to try devilbox

    The Devilbox is a modern and highly customisable dockerized PHP stack supporting full LAMP and MEAN and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically. Reverse proxies per project are supported to ensure listening server such as NodeJS can also be reached. Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search