I'm running a simple docker-compose file with mariadb, that is then going to be used by wordpress.
version: '2'
volumes:
db:
driver: local
services:
db:
image: mariadb:10
environment:
MYSQL_HOST: db
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
ports:
- "3306:3306"
volumes:
- db:/var/lib/mysql
But when I run docker-compose up it fails.
I first thought it might be a memory problem so I upped the virtualbox instance to 2gb of ram, but still the same problem happens.
If I try to login to the docker instance docker exec -it mydir_db_1 bash and try to connect with the same command as in the entrypoint file
mysql --protocol=socket -uroot
I get ERROR 2047 (HY000): Wrong or unknown protocol
Don't know if that's a clue...
db_1 | Initializing database
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 51 ...
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Using mutexes to ref count buffer pool pages
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: The InnoDB memory heap is disabled
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Memory barrier is not used
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Using Linux native AIO
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Using SSE crc32 instructions
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Initializing buffer pool, size = 256.0M
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Database physically writes the file full: wait...
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
db_1 | 2016-02-27 21:44:24 140131101788096 [Warning] InnoDB: New log files created, LSN=45883
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Doublewrite buffer not found: creating new
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Doublewrite buffer created
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: 128 rollback segment(s) are active.
db_1 | 2016-02-27 21:44:24 140131101788096 [Warning] InnoDB: Creating foreign key constraint system tables.
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Foreign key constraint system tables created
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Creating tablespace and datafile system tables.
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Tablespace and datafile system tables created.
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Waiting for purge to start
db_1 | 2016-02-27 21:44:24 140131101788096 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 0
db_1 | 2016-02-27 21:44:24 140130316683008 [Note] InnoDB: Dumping buffer pool(s) not yet started
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 80 ...
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Using mutexes to ref count buffer pool pages
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: The InnoDB memory heap is disabled
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Memory barrier is not used
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Using Linux native AIO
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Using SSE crc32 instructions
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Initializing buffer pool, size = 256.0M
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Highest supported file format is Barracuda.
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: 128 rollback segment(s) are active.
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Waiting for purge to start
db_1 | 2016-02-27 21:44:27 139881937319872 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616799
db_1 | 2016-02-27 21:44:27 139881154053888 [Note] InnoDB: Dumping buffer pool(s) not yet started
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] /usr/sbin/mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 109 ...
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Using mutexes to ref count buffer pool pages
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: The InnoDB memory heap is disabled
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Memory barrier is not used
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Using Linux native AIO
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Using SSE crc32 instructions
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Initializing buffer pool, size = 256.0M
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Highest supported file format is Barracuda.
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: 128 rollback segment(s) are active.
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Waiting for purge to start
db_1 | 2016-02-27 21:44:29 140319628658624 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616809
db_1 | 2016-02-27 21:44:29 140318842259200 [Note] InnoDB: Dumping buffer pool(s) not yet started
db_1 | ERROR: 1049 Unknown database 'test'
db_1 | 2016-02-27 21:44:29 140319628658624 [ERROR] Aborting
db_1 |
db_1 |
db_1 | WARNING: OPENGIS REQUIRED SP-S WERE NOT COMPLETELY INSTALLED!
db_1 | GIS extentions might not work properly.
db_1 |
db_1 | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
db_1 | To do so, start the server, then issue the following commands:
db_1 |
db_1 | '/usr/bin/mysqladmin' -u root password 'new-password'
db_1 | '/usr/bin/mysqladmin' -u root -h password 'new-password'
db_1 |
db_1 | Alternatively you can run:
db_1 | '/usr/bin/mysql_secure_installation'
db_1 |
db_1 | which will also give you the option of removing the test
db_1 | databases and anonymous user created by default. This is
db_1 | strongly recommended for production servers.
db_1 |
db_1 | See the MariaDB Knowledgebase at http://mariadb.com/kb or the
db_1 | MySQL manual for more instructions.
db_1 |
db_1 | Please report any problems at http://mariadb.org/jira
db_1 |
db_1 | The latest information about MariaDB is available at http://mariadb.org/.
db_1 | You can find additional information about the MySQL part at:
db_1 | http://dev.mysql.com
db_1 | Support MariaDB development by buying support/new features from MariaDB
db_1 | Corporation Ab. You can contact us about this at [email protected].
db_1 | Alternatively consider joining our community based development effort:
db_1 | http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
db_1 |
db_1 | Database initialized
db_1 | MySQL init process in progress...
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] mysqld (mysqld 10.1.12-MariaDB-1~jessie) starting as process 136 ...
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Using mutexes to ref count buffer pool pages
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: The InnoDB memory heap is disabled
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Memory barrier is not used
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Using Linux native AIO
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Using SSE crc32 instructions
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Initializing buffer pool, size = 256.0M
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Highest supported file format is Barracuda.
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: 128 rollback segment(s) are active.
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Waiting for purge to start
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616819
db_1 | 2016-02-27 21:44:32 139646403053312 [Note] InnoDB: Dumping buffer pool(s) not yet started
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] Plugin 'FEEDBACK' is disabled.
db_1 | 2016-02-27 21:44:32 139647187081152 [Warning] 'user' entry 'root@7419339e9969' ignored in --skip-name-resolve mode.
db_1 | 2016-02-27 21:44:32 139647187081152 [Warning] 'proxies_priv' entry '@% root@7419339e9969' ignored in --skip-name-resolve mode.
db_1 | 2016-02-27 21:44:32 139647187081152 [Note] mysqld: ready for connections.
db_1 | Version: '10.1.12-MariaDB-1~jessie' socket: '/var/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process in progress...
db_1 | MySQL init process failed.
Any suggestions?
Hello,
this is caused by that bug:
https://bugs.mysql.com/bug.php?id=31832
In other words, don't set MYSQL_HOST. It is not required as far as I know.
Closing old issue.
Most helpful comment
Hello,
this is caused by that bug:
https://bugs.mysql.com/bug.php?id=31832
In other words, don't set MYSQL_HOST. It is not required as far as I know.