Skip to main content

VillageSQL is a drop-in replacement for MySQL with extensions.

All examples on this page work on VillageSQL. Install Now →
You need a running server and a client that can talk to it. Any MySQL 8.4 or later server works, and so does VillageSQL, which is MySQL with an extension framework added. No lesson here uses an extension, so either one will do.

Pick a way to run a server

Each of those pages ends with a running server. Come back here once you have one.

Get a client

This tutorial drives the server with mysql, the command line client. Where it comes from depends on which way you went:
  • The installer or an existing server. The client came with the server, so you already have it.
  • Docker. The client lives inside the container, not on your machine. Reach it with docker exec -it CONTAINER_NAME mysql -u root -p, or install a client locally and connect over the port the container publishes.

Check that you can connect

Run this, and press Return at the password prompt if root has no password:
Your version string will differ. What matters is that a version came back, because that means the client reached the server and logged in.

When it does not connect

Both of the errors below mean the client never reached a server, so neither is about your password. You can reproduce either one on a working setup by pointing the client somewhere wrong. A socket path with nothing behind it:
A port with nothing listening on it:
The number in the trailing brackets is the operating system’s own error number, so it can differ between macOS and Linux. The missing-socket number is 2 on both; the refused-connection number is 61 on macOS and 111 on Linux. The part to read is the socket path or the host and port, because that tells you where the client looked. If that location is wrong, correct it. If it is right, the server is not running.

See also