Closed evandrojr closed 6 years ago
@evandrojr See attached image - you have to set the hostname attribute to mysql
instead of the default localhost
what database setting
If you are using docker-compose then the hostname, username and password should be tastydb, tastyuser and tastypass. These settings should have been prefilled. Please check and report back if it doesn’t work.
Not Working Plz help me i try to install in aws
I just verified that the mentioned settings do indeed work. You just have to give the db container a few minutes to setup the user and a database before you can connect to it. I’d suggest you wait a few minutes after you run docker-compose up -d
before opening the portal. Then use the following credentials.
Database: tastydb
Hostname: tasty_db
Username: tastyuser
Password: tastypass
Though you really should change these credentials in the docker-compose.yml
file
On 15-May-2018, at 12:32 AM, Lalit Nandan Diwakar notifications@github.com<mailto:notifications@github.com> wrote:
Not Working Plz help me
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ThisIsQasim/TastyIgniter/issues/2#issuecomment-388935678, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARdynie-bjnNzpx75M-8FDmy_6SBN8Dbks5tydvmgaJpZM4QIM-9.
i am face this error
any suggestion for me or any alternate way
@lalitnandandiwakar Your Hostname
shouldn't be tasty_db
- try mysql
instead
I have pushed a new commit. The new settings are as follows and should work. As always you can (and should) change these in the docker-compose.yml
file. Also remember that the mariadb container takes a few seconds to setup a database before you can use it so give it a minute or two before you access the UI.
MYSQL_HOSTNAME=db
MYSQL_DATABASE=tastyigniter
MYSQL_USER=tastyigniter
MYSQL_PASSWORD=somepassword
I have also fixed the entrypoint script so it should automatically fill in the correct values
Hi, I have built the image from the Dockerfile you provided. And the Entrypoint script auto fills the credentials but it still throws the same error:
Database connection was unsuccessful, please make sure the database server, username and password is correct.
Any idea? why could it be?
Thanks.
@luhgit Are you using the docker-compose file? If so just give it a few minutes after you bring the db container up. Try running the setup once the db is up and running.
@ThisIsQasim: I actually waited and usually on my current machine it is almost instant. I have attached the screenshot of all the resources. But error still persists. I also modified your actual script a tiny bit as Dockerfile did not work out of the box due to some depreciation of php libraries. Do you spot some discrepancy?
Thanks.
Can you check if you can actually connect to the database with the credentials you are entering in tastyigniter?
I actually tried to connect locally via mysql command even inside of the container. but did get into the database.
Looks like your db container doesn’t have the user. You can either do that by recreating that container on an empty volume or create a user by logging in with the root user.
Actually, Now I have realized the error. Mariadb does not create a new user if a volume has already been created for a certain docker-compose file. I had to remove also the volume and then rerun and this time it works like a charm.
Thanks for hint @ThisIsQasim
so instead of:
docker-compose down
one must do:
docker-compose down -v
(If it helps someone else)
Yes. The mariadb container will not create a user if there is data on the volume.
Hi,
Nice work!
I've tried at the 'Database Settings', page that:
But it did not work. What is the host? I am missing anything?
Thanks!