new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Drizzle ORM · all subjects

mysql/setup

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Pull MySQL Docker image

To pull the latest MySQL image from Docker Hub, run `docker pull mysql` in your terminal. To pull a specific version, use `docker pull mysql:8.2` (or replace with your desired version tag). After pulling, verify the image was downloaded by checking the Images tab in Docker Desktop or by running `docker images`.

Start MySQL Docker container

To start a new MySQL container, run: `docker run --name drizzle-mysql -e MYSQL_ROOT_PASSWORD=mypassword -d -p 3306:3306 mysql`. The `--name drizzle-mysql` option assigns the container name. The `-e MYSQL_ROOT_PASSWORD=mypassword` sets the root user password. The `-d` flag runs the container in detached mode (background). The `-p 3306:3306` option maps port 3306 on the container to port 3306 on the host machine. The `mysql` argument specifies the image to use.

MySQL Docker container optional parameters

Additional environment variables can be specified when starting a MySQL Docker container: `-e MYSQL_DATABASE=` creates a new database when the container is created (default is `mysql`). `-e MYSQL_USER=` and `-e MYSQL_PASSWORD=` create a new user with a password when the container is created. The `MYSQL_ROOT_PASSWORD` must still be specified for the root user.

MySQL connection URL format

The database URL format for connecting to MySQL is `mysql://<user>:<pa••••••d>@<host>:<port>/<database>`. For a locally created container with the example configuration, the URL would be `mysql://root:myp••••••rd@localhost:3306/mysql`.

Verify MySQL Docker container is running

To verify that the MySQL Docker container is running, check the Containers tab in Docker Desktop or use the `docker ps` command in your terminal.

Give your agent this brain