Public Repository

Last pushed: 5 months ago
Short Description
MySql server
Full Description

Getting Started

Standard Mysql Server. Comes with the BAT moodle Database by default to ease moodle setups.
For Moodle, please check the readMe file for other useful information.

Prerequisites

  • Install the web project document-root.
  • Install arthur28inc/webapp as moodleapp.

Installing

  • docker run -it -p 3306:3306 --name mysqldb arthur28inc/mysqlthur /bin/bash
  • mysqld_safe
  • Crtl+P, Ctrl+Q

Post-Install

  • (If needed) Link a phpmyadmin container:
    docker run --name phpmyadmin -d --link mysqldb:db -p 8080:80 phpmyadmin/phpmyadmin

Test the setup

  • From a running container (or from your machine), connect to your local database:
    mysql -h 127.0.0.1 -P 3306 -u root -p"Password286"
    (root user will not work from your machine)

Useful commands

  • docker exec -it mysqldb /bin/bash
  • docker run -d -p 326:3306 --name mysqldb arthur28inc/mysqlthur /usr/bin/mysqld_safe
  • ip addr show
  • CREATE USER 'userman'@'%' IDENTIFIED BY 'tester12-Password';
  • GRANT ALL PRIVILEGES ON . TO 'userman'@'%' IDENTIFIED BY 'tester12-Password' WITH GRANT OPTION;
  • vim /etc/mysql/mysql.conf.d/mysqld.cnf
  • mounting db data
    docker run -d -p 3306:3306 -v /data/mysql:/var/lib/mysql mysql

Users

root / Password286
moodleadmin / Moodle286

Softwares

  • mysqlserver
    5.7.17-0ubuntu0.16.04.1
Docker Pull Command
Owner
arthur28inc

Comments (0)