Unifiedtransform
Unifiedtransform copied to clipboard
SQLSTATE[HY000] [2002] Host is unreachable (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
Trying to run the project with the docker. Followed the steps and copied values into .env file. after that ran the sudo ./docker-install.sh command. At the very end of the setup process i get the above mentioned error. Now I don't understand where the issue lies. Would request someone to please have a look and help me out why such an issue is occurring. It seems like the DB is not rightly set up but why I don't understand. Here is the screenshot of what I see when logged in:

And here is what I am seeing on my terminal:

Any help would be highly appreciated.
I'm the pull requester of the new Docker setup
Kindly share your .env so I could give insight on this
Facing the same issue and using the default env file:
APP_NAME=UnifiedTransform
APP_ENV=local
APP_KEY=base64:JZLAgKJlzf/7V/2FlwvmNfh6xAp9bvtq7vZpMwIjhmk=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=school
DB_USERNAME=root
DB_PASSWORD=schoolapp
DOCKER_WEBSERVER_HOST=4049
DOCKER_PHPMYADMIN_HOST=5051
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
STRIPE_KEY=
STRIPE_SECRET=
make your .env file like this in like 8:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=unifiedtransform DB_USERNAME=root DB_PASSWORD=
enjoy!
also make sure you dont edit:
"APP_NAME=UnifiedTransform"
@sjsajju Are you able to access the Docker mysql through the Docker phpmyadmin?
@sjsajju Not sure if you resolved this.
the problem is my sql thinks you are trying to add a user instead of setting the root user password.
current docker-composer.yml file
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} MYSQL_USER: ${DB_USERNAME} MYSQL_PASSWORD: ${DB_PASSWORD}
you can fix this by changing the .env file
DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=school DB_USERNAME=Something else than root DB_PASSWORD=schoolapp
also note the root password will be same as alternative user password for db.
a bugfix has been merged to master on #312 kindly re-pull and confirm if this issue still persists Tested on Ubuntu 20.04 (VPS Server), Docker version 20.10.7 and docker-compose version 1.27.4
Docker setup seems to be broken right now. But manual installation instruction works properly.
@changeweb please give more detail about it
@sjsajju I have found the fix. Replace DB_HOST=db with DB_HOST=localhost in .env file.
@changeweb then it will use mysql in your host machine instead of the mysql in docker