Giter VIP home page Giter VIP logo

mariadb's Introduction

MariaDB Dockerfile

This repository contains Dockerfile of MariaDB for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull dockerfile/mariadb

    (alternatively, you can build an image from Dockerfile: docker build -t="dockerfile/mariadb" github.com/dockerfile/mariadb)

Usage

Run mysqld-safe

docker run -d --name mysql -p 3306:3306 dockerfile/mariadb

Run mysql

docker run -it --rm --link mysql:mysql dockerfile/mariadb bash -c 'mysql -h $MYSQL_PORT_3306_TCP_ADDR'

mariadb's People

Contributors

drhofman avatar pilwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mariadb's Issues

Error when building image

I ran the following command to build a mariadb image on an Ubuntu 14.04 VM.

sudo docker build -t="dockerfile/mariadb" github.com/dockerfile/mariadb

Got the following errors at the end of process:

Setting up mariadb-server-10.0 (10.0.15+maria-1~trusty) ...
invoke-rc.d: policy-rc.d denied execution of stop.
dpkg: error processing package mariadb-server-10.0 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.0 (= 10.0.15+maria-1~trusty); however:
  Package mariadb-server-10.0 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.4) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 mariadb-server-10.0
 mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

mysql server crashes often

I am using mariadb and wordpress container. But this error keeps on happening. How can I ensure that this crash does not happen anymore ? Am I being attacked ? Or is it a problem that occurs to other people ? How can I attach to mariadb and have access to the shell and try to find out what goes on inside mariadb container?

See below the messages logged after every crash... There seems to be a high number of page hits as well. page visits go up to 20.000 to 60.000 hits on pages. These seem to be the work of crawlers, bots. Not sure if these are malicious attacks.

Any help on how to go about dealing with this problem?

I have mariadb, wordpress and phpmyadmin working in three docker containers under ubuntu 14 on digital ocean.
Here are the crash messages:

[1668002.926214] Out of memory: Kill process 16765 (mysqld) score 176 or sacrifice child [1668002.935614] killed process 16765 (mysqld) total-vm:1012836kb, anon-rss:178840kb, file-rss:0kb
[1668040.992415] killed process 22570 (php5-fpm) total-vm:418044kB, anon-rss:145392kB, file-rss: 20624kB

New York Server:
[1225007.977126] Out of memory: Kill process 3161 (mysqld) score 245 or sacrifice child [
1225007.985657] killed process 3161 (mysqld) total-vm: 977148kb, anon-rss:122488kb, file-rss:0kB)

Frankfurt server
[1632264.057873] Out of memory: Kill process 22421 (mysqld) score 246 or sacrifice child
[1632264.067530] Killed process 22421 (mysqld) total-vm: 1005228kb, anon-rss:249328kb, file-rss:0kb

How to create a SQL dump

How to dump database into a .sql format file?

Usualy i do it with mysqldump -u user -p database > database_dump.sql

ERROR: 1049 Unknown database 'test'

Docker 1.9.1 on Ubuntu 14:
docker run --name some-mariadb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mariadb:10.1

Error:
ERROR: 1049 Unknown database 'test'

Extended Info:
Initializing database
2016-02-01 20:06:04 139864276592576 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB-1jessie) starting as process 50 ...
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Memory barrier is not used
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Using Linux native AIO
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Using SSE crc32 instructions
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Completed initialization of buffer pool
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-02-01 20:06:04 139864276592576 [Note] InnoDB: Database physically writes the file full: wait...
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2016-02-01 20:06:05 139864276592576 [Warning] InnoDB: New log files created, LSN=45883
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Doublewrite buffer created
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: 128 rollback segment(s) are active.
2016-02-01 20:06:05 139864276592576 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Foreign key constraint system tables created
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Tablespace and datafile system tables created.
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Waiting for purge to start
2016-02-01 20:06:05 139864276592576 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 0
2016-02-01 20:06:05 139863475091200 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-02-01 20:06:07 140263219955648 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB-1
jessie) starting as process 78 ...
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Memory barrier is not used
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Using Linux native AIO
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Using SSE crc32 instructions
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Completed initialization of buffer pool
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: 128 rollback segment(s) are active.
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Waiting for purge to start
2016-02-01 20:06:07 140263219955648 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 1616799
2016-02-01 20:06:07 140262424676096 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-02-01 20:06:10 140263203276736 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB-1~jessie) starting as process 107 ...
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Memory barrier is not used
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Using Linux native AIO
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Using SSE crc32 instructions
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Initializing buffer pool, size = 256.0M
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Completed initialization of buffer pool
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: 128 rollback segment(s) are active.
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Waiting for purge to start
2016-02-01 20:06:10 140263203276736 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 1616809
2016-02-01 20:06:10 140262407898880 [Note] InnoDB: Dumping buffer pool(s) not yet started
ERROR: 1049 Unknown database 'test'
2016-02-01 20:06:10 140263203276736 [ERROR] Aborting

Volumes cannot be mounted

It is not possible to run this container using --volumes-from since the configuration and db changes happen at build time and not at startup.

Error: Environment variable KALITE_SCRIPT_DIR is not set Ka Lite.exe

I am getting this message

Error: Environment variable KALITE_SCRIPT_DIR is not set Ka Lite.exe

when trying to start Kalite. The program has run several months with no problems.

version; 0.17.0 Running on a Windows 10 Laptop

kalite error message

I would appreciate any ideas on how to fix the issue. The laptop is at a school in India and i am in the US.

"TERM environment variable not set." when executing "mysql" in container

docker exec -it mariadb bash
mysql
produces the following error message: TERM environment variable not set.

Unsure why since echo $TERM returns dumb and issuing export TERM=dumb resolves issue.

If the environment variable is explicitly issued in the dockerfile, the error message never appears, i.e. adding ENV TERM dumb

mariadb fails - Host Directory as a Data Volume

I am struggling with the proper use, when I include a data volume to a host directory mariadb fails. In my docker-compose.yml I have:

expressionengine:
  image: mariadb
  expose: 
   - "3306"
  volumes:
   - ../containers/expressionengine/var-lib-mysql/:/var/lib/mysql
  environment:
   - MYSQL_ROOT_PASSWORD=
   - MYSQL_DATABASE=expressionengine

But something is off:

Attaching to builddev_expressionengine_1
expressionengine_1 | Running mysql_install_db ...
expressionengine_1 | Installing MariaDB/MySQL system tables in '/var/lib/mysql/' ...
expressionengine_1 | 150603  5:15:20 [Note] /usr/sbin/mysqld (mysqld 10.0.19-MariaDB-1~wheezy-log) starting as process 38 ...
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Using mutexes to ref count buffer pool pages
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: The InnoDB memory heap is disabled
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Memory barrier is not used
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Compressed tables use zlib 1.2.7
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Using Linux native AIO
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Not using CPU crc32 instructions
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Initializing buffer pool, size = 256.0M
expressionengine_1 | 150603  5:15:20 [Note] InnoDB: Completed initialization of buffer pool
expressionengine_1 | 2015-06-03 05:15:20 7f2425ed9760  InnoDB: Operating system error number 13 in a file operation.
expressionengine_1 | InnoDB: The error means mysqld does not have the access rights to
expressionengine_1 | InnoDB: the directory.

Im sure its permissions given that the dir is written with my host user ownership:

bash-3.2$ cd containers/expressionengine/var-lib-mysql/
bash-3.2$ ls -l
drwxr-xr-x  2 tom  staff   68 Jun  3 10:16 mysql

Can I chown from docker-compose?

help with db commands from compose

Trying to import db data in my docker-compose.yml but I can not get a successful build when I include command: something. I would like to do something along the lines of:

command: 'exec mysql -uroot -p$MYSQL_EVN_MYSQL_ROOT_PASSWORD databasename < ./data.sql'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.