Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to mariadb #736

Closed
vitoo opened this issue Apr 3, 2017 · 9 comments
Closed

Can't connect to mariadb #736

vitoo opened this issue Apr 3, 2017 · 9 comments

Comments

@vitoo
Copy link
Contributor

vitoo commented Apr 3, 2017

Hello,

I can't make mariadb work with laradock v5.0.3, with stock docker-compose.yml and .env

It works with mysql throug adminer (host: mysql, port: 3306, root/root) and inside the mysql container.

But i can't connect to mariadb from adminer : (host: mariadb, port: 3306, root/root)
SQLSTATE[HY000] [1045] Access denied for user 'root'@'172.18.0.4' (using password: YES)

And even inside the mariadb container :

$ docker-compose exec mariadb bash
root@88cf42a7d05e:/# mysql -uroot -proot
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

MariaDB container log :

mariadb_1             | 2017-04-03 19:25:16 140329248704448 [Note] Server socket created on IP: '::'.
mariadb_1             | 2017-04-03 19:25:16 140329248704448 [Warning] 'proxies_priv' entry '@% root@077c23180bc8' ignored in --skip-name-resolve mode.
mariadb_1             | 2017-04-03 19:25:16 140329248704448 [Note] mysqld: ready for connections.

Any idea to fix this ?

Thanks for your help!

@winfried-van-loon
Copy link
Contributor

Within the dotenv file, you can still use the MARIADB_USER user and password. I'm having the same issue with the root user. There seems to be a problem in the config file: https://github.com/laradock/laradock/blob/master/docker-compose.yml#L207

Mahmoudz added a commit that referenced this issue Apr 4, 2017
Fixing MariaDB root password variable. #736
@Mahmoudz
Copy link
Member

Mahmoudz commented Apr 4, 2017

Closed #737 by @winfried-van-loon. Thanks,

@Mahmoudz Mahmoudz closed this as completed Apr 4, 2017
@winfried-van-loon
Copy link
Contributor

@Mahmoudz I'm afraid it was only part of the solution, with the fixes included I wasn't able to actually connect. Could you give it a try?

@vitoo
Copy link
Contributor Author

vitoo commented Apr 4, 2017

Maybe the issue is due to the volume ?
The same volume are mounted on the host machine ?

/var/lib/mysql

@winfried-van-loon
Copy link
Contributor

winfried-van-loon commented Apr 4, 2017

Well, the "default" user does work (just the root user that can't login), so I doubt it's in the network or connectivity of the volumes. I've checked the docker-compose.yml for related issues, haven't found any. Good idea, though!

@winfried-van-loon
Copy link
Contributor

winfried-van-loon commented Apr 4, 2017

May be related to MariaDB/mariadb-docker#21 and a possible temporary solution could be to reset the root user password until we find the real problem & solution: MariaDB/mariadb-docker#99

@vitoo
Copy link
Contributor Author

vitoo commented Apr 4, 2017

Yes we need to reset the mariadb volume for sure

@winfried-van-loon
Copy link
Contributor

You're right. After removing everything, it worked. Apparently I didn't remove everything in my last test. Thanks for your help @vitoo

@vitoo
Copy link
Contributor Author

vitoo commented Apr 5, 2017

Great, so it's fixed now

agebeyaw pushed a commit to agebeyaw/laradock that referenced this issue Aug 22, 2018
agebeyaw pushed a commit to agebeyaw/laradock that referenced this issue Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants