lamp-devstack-mysql
Images for local development in LAMP devstack (MySQL)
5.5K
Images for local development in LAMP devstack
linux/amd64utf8mb4 as a default charset, an optional support of Windows Host is also availableMySQL server starts at the same time as the web server.
Available MySQL images:
jakubboucek/lamp-devstack-mysql:10.6jakubboucek/lamp-devstack-mysql:10.11jakubboucek/lamp-devstack-mysql:11.4jakubboucek/lamp-devstack-mysql:11.8jakubboucek/lamp-devstack-mysql:latestLTS (long-term support) MySQL images (currently 11.8):
jakubboucek/lamp-devstack-mysql:ltsThe RC pre-release of MySQL 12.2 images have the -rc suffix, example:
jakubboucek/lamp-devstack-mysql:12.2-rcjakubboucek/lamp-devstack-mysql:12.2-1-rcDefault credentials:
rootdevstackdefaultFrom Host, MySQL is accessible using:
127.0.0.133060From docker guest, MySQL is accessible using:
mysqldb3306If you are connecting to the MySQL server from a PHP application running inside Docker, use the docker guest access values, but when you're connecting from outside (for example, from your computer, using HeidiSQL or Sequel), use host access.
PHP example:
$pdo = new PDO('mysql:host=mysqldb;dbname=default;charset=utf8mb4', 'root', 'devstack');
// or
$mysqli = new mysqli('mysqldb', 'root', 'devstack', 'default');
$mysqli->set_charset('utf8mb4');
MySQL may crash when Host is running Windows:
The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file
You can try to fix it by adding mysql-windows.cnf
(download)
and add it to the MySQL config directory /etc/mysql/conf.d/ inside the Docker container.
In docker-compose.yml file, just link this downloaded file to volume section:
volumes:
- "./.docker/mysql/data:/var/lib/mysql"
- "./mysql-windows.cnf:/etc/mysql/conf.d/mysql-windows.cnf"
The default timezone is not defined (UTC will be used). You can modify the default timezone by setting the TZ
environment variable to the desired timezone name (e.g., Europe/Prague).
It can also be specified directly with docker run:
docker run -it --rm -e TZ=Europe/Prague jakubboucek/lamp-devstack-mysql
Or in your docker-compose.yml file:
environment:
TZ: Europe/Prague
The TZ environment variable is recognized by Linux tools as well. By creating the variable you modify the default
timezone for the whole Linux operating system and also MySQL.
Content type
Image
Digest
sha256:cfde869f5…
Size
104.4 MB
Last updated
5 days ago
Requires Docker Desktop 4.37.1 or later.