User Tools

Site Tools


unraid:dockers:mysql

This is an old revision of the document!


MySQL

MySQL is an open-source relational database management system. Its name is a combination of “My”, the name of co-founder Michael Widenius's daughter, and “SQL”, the abbreviation for Structured Query Language. Brimble.com uses MySQL to store the tables for most all things running on the server.

Version

I used the official docker from Bungy's repository.

Docker Setup

  • Network Type: Custom: brimble
  • Fixed IP address (optional): blank
  • Console shell command: Shell
  • Privileged: off
  • Host Port 1: 3306
  • Host Path 1: /mnt/disks/samsung_ssd/appdata/mysql
  • Key 1 (MYSQL_ROOT_PASSWORD):
  • Key 2 (MYSQL_DATABASE): nextcloud (i used this to create the nexcloud structure… added more later)
  • Key 3 (MYSQL_USER):
  • Key 4 (MYSQL_PASSWORD):

App Settings

  • User standard SQL commands to import databases from back up, allow privileges, etc.
  • See Install MySql section of installing ubuntu pages for most commands. write access is not needed as that feature was removed by changing the way the NCAA pool temp stores the data.

Load Football pool

  • Go to mysql docker console
  • install vim
    • apt-get update
      apt-get install vim
  • Edit the conf file to add a directory
    • vim /etc/mysql/my.cnf
    • add
      secure-file-priv= /var/lib/mysql
  • Create csv file
  • Cyberduck it over to tmp folder on unraid server
  • copy it to tmp folder on docker
    docker cp /tmp/2021.csv mysql:/tmp/2021.csv
  • go back to docker console, copy it to mysql directory
     cp /tmp/2021.csv /var/lib/mysql/2021.csv
  • log into mysql and use normal commands
    LOAD DATA LOCAL INFILE "/var/lib/mysql/2021.csv" INTO TABLE games COLUMNS TERMINATED BY ',';
    UPDATE games SET vscore = NULL where year = 2021;
    UPDATE games SET hscore = NULL where year = 2021;
unraid/dockers/mysql.1630966767.txt.gz · Last modified: by dirk