1.8 KiB
1.8 KiB
Environment Configuration Instructions
Database Password Setup
The Magento database configuration has been added to your .env file, but you need to set the MySQL password.
Step 1: Edit .env File
Open your .env file and update these lines with your actual MySQL root password:
MAGENTO1_DB_PASSWORD=your_actual_mysql_password
MAGENTO2_DB_PASSWORD=your_actual_mysql_password
Step 2: Clear Config Cache
After updating the password, clear Laravel's config cache:
ddev exec "php artisan config:clear"
Or if you're not using DDEV:
php artisan config:clear
Step 3: Test the Connection
- Visit the migration page:
https://migrate.ddev.site/migration - Click the "Test Connections" button
- You should see green checkmarks if the connections are working
Troubleshooting
If you don't know your MySQL password:
-
Try connecting from the host:
mysql -u root -p(Press Enter when prompted for password if there's no password)
-
Or check if MySQL has no password:
- Leave
MAGENTO1_DB_PASSWORD=empty (no value after the=) - Leave
MAGENTO2_DB_PASSWORD=empty
- Leave
If connection still fails:
-
Verify MySQL is accessible from DDEV:
ddev exec "mysql -h 172.22.0.1 -u root -pyour_password -e 'SHOW DATABASES LIKE \"magento%\"'" -
Check MySQL bind address:
sudo grep bind-address /etc/mysql/mariadb.conf.d/50-server.cnfShould be
bind-address = 0.0.0.0(not127.0.0.1) -
Check if databases exist:
mysql -u root -p -e "SHOW DATABASES LIKE 'magento%';"
Current Configuration
Your current .env settings:
- Host: 172.22.0.1 (DDEV gateway IP)
- Port: 3306
- Database: magento1 and magento2
- Username: root
- Password: (needs to be set)