-
Notifications
You must be signed in to change notification settings - Fork 12
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 local MySQL server through socket '/var/lib/mysql/mysql. sock' (2) #2
Comments
hi pascal, it shouldn't work like that, look at the mysql db of proxysql, connection can't be made from the container itself. let me know :) |
Hello Rachid, I still don't get it I guess :-/ I tried everything but I don't understand the logic of not using
At the moment, with my single instance of Percona in prod, I can do this:
|
To put it simply PWD doesn't provide anything rather than a Docker engine. So in your case you will need a container which is connected into the galera overlay network and hosts a mysql client. In production apps will connect through proxysql using their own mysql driver (pdo mysql for php based apps) Have fun :-) |
I get the concept. In the case of a single instance, I simply docker exec into Percona container and do some mysql admin task. Then I connect the CMS apps to the Percona container. There is something I don't understand in the flow. How are you suppose to create DB, drop, do mysql dump stuff if not doing docker exec into one of the three Peronna container in the DB cluster? On step 3, can you clarify where are we suppose to run: |
you should not use docker exec to issue mysql commands
this should be done from a node outside the cluster architecture, rather a host (for admin purpose) or using mysql application driver (like pdo for php) You are trying to use pxc like a standalone mysql server, which is not the case, there are concept and architecture that should be taken in account when dealing with pxc clustering architecture. in the case of my tutorial, every should be issued through the proxysql which is the only instance that knows nodes existing in the cluster and deals for you about load-balancing / resiliency Have fun :) |
Got it! I'll try it with phpadmin :) |
I added phpadmin into the mix. Tried to log in (wiht pass s3cr3TL33tP@ssw0rd) via the GUI and it's not connecting.
|
As you login via the proxy (which is the right thing to do), you can't log in in as root, basically you will log in as a user known by proxysql which will "route" you to a working node. we are not dealing with docker issues right now, but more with understanding how proxysql and galera cluster in PXC works together. Again, i advise you to dig in :) Have fun ! :) |
You are right this is not a Docker issue. Simply me not knowing how to operate ProxySql :-/ I used those logins and still can't connect:
Thank you for everything! |
all right :) give me some time to test your own setup and let you know where it breaks :) Stay tuned ! |
hello, I have the same issue also, should I run it in RancherOS what will happen if I run it like this
|
Hi,
I'm getting this error:
Details:
You can quickly recreate my setup using play-with-docker. See the steps I have done here: https://github.com/pascalandy/docker-stack-this/tree/master/PXC-Cluster
Thanks!
The text was updated successfully, but these errors were encountered: