ThisIsQasim / TastyIgniter

TastyIgniter Docker
GNU General Public License v3.0
33 stars 27 forks source link

Database settings for setup #2

Closed evandrojr closed 6 years ago

evandrojr commented 6 years ago

Hi,

Nice work!

I've tried at the 'Database Settings', page that:

  MYSQL_DATABASE: tastydb
  MYSQL_USER: tastyuser
  MYSQL_PASSWORD: tastypass

But it did not work. What is the host? I am missing anything?

Thanks!

aeksco commented 6 years ago

@evandrojr See attached image - you have to set the hostname attribute to mysql instead of the default localhost

screenshot from 2018-02-28 14-26-25

lalitnandandiwakar commented 6 years ago

what database setting

ThisIsQasim commented 6 years ago

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.

lalitnandandiwakar commented 6 years ago

Not Working Plz help me i try to install in aws

ThisIsQasim commented 6 years ago

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.

lalitnandandiwakar commented 6 years ago

i am face this error

image

lalitnandandiwakar commented 6 years ago

any suggestion for me or any alternate way

aeksco commented 6 years ago

@lalitnandandiwakar Your Hostname shouldn't be tasty_db - try mysql instead

ThisIsQasim commented 6 years ago

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

ThisIsQasim commented 6 years ago

I have also fixed the entrypoint script so it should automatically fill in the correct values

luhgit commented 3 years ago

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.

ThisIsQasim commented 3 years ago

@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.

luhgit commented 3 years ago

@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.

image

image

image

image

image

ThisIsQasim commented 3 years ago

Can you check if you can actually connect to the database with the credentials you are entering in tastyigniter?

luhgit commented 3 years ago

I actually tried to connect locally via mysql command even inside of the container. but did get into the database.

image

ThisIsQasim commented 3 years ago

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.

luhgit commented 3 years ago

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)

ThisIsQasim commented 3 years ago

Yes. The mariadb container will not create a user if there is data on the volume.