Docker Community Forums

Share and learn in the Docker community.

Mysql service couldn't start after running a bugzilla-container with data volumen


(Qebetty) #1

Hi all,
I have a problem when I run a bugzilla-container with created data volume on local host, the container and data volume are created but the mysql service couldn’t start I got errors on log:

2014-09-26 17:50:27 563 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
2014-09-26 17:50:31 588 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2014-09-26 17:50:31 588 [Note] Plugin ‘FEDERATED’ is disabled.
./mysqld: Table ‘mysql.plugin’ doesn’t exist
2014-09-26 17:50:31 588 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
2014-09-26 17:50:31 588 [Note] InnoDB: Using atomics to ref count buffer pool pages

To create the container I’ve run this:

sudo docker run -d -t --privileged
–name bugzilla
–hostname bugzilla
–publish 8080:80
–publish 2222:22
–volumes /localhost/data:/var/lib/mysql
dklawren/docker-bugzilla

Would someone help me to figure out what is happening here?
I will appreciate any help. Thanks.


(Nick Stinemates) #2

Looks like there’s an issue with your database - the connection is being made appropriately by mysql.plugin does not exist.

Also, just try this

docker run -v /localhost/data:/var/lib/mysql ubuntu ls -l /var/lib/mysql

What shows up? That should point you in the right direction


(Qebetty) #3

The container is created but it couldn’t start so I wasn’t able to see the created volumen. Do you have another idea, about it?

By the way, when the bugzilla container is created without volumen, mysql service start without problem, the my.cnf is:
[mysql]
max_allowed_packet=1G
[mysqld]
user = bugzilla
default_storage_engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid_file = /var/lib/mysql/:wmysql.pid
key_buffer_size = 32M
myisam_recover = FORCE,BACKUP
max_allowed_packet = 1G
max_connect_errors = 1000000
innodb = FORCE
datadir = /var/lib/mysql/
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
tmp_table_size = 32M
max_heap_table_size = 32M
query_cache_type = 0
query_cache_size = 0
max_connections = 500
thread_cache_size = 50
table_definition_cache = 1024
table_open_cache = 2048
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 256M
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table = 1
innodb_buffer_pool_size = 1G
innodb_flush_neighbors = 0
innodb_flush_log_at_trx_commit = 2
log_error = /var/lib/mysql/mysql-error.log
log_queries_not_using_indexes = 0
slow_query_log = 0
slow_query_log_file = /var/lib/mysql/mysql-slow.log
general_log = 0
general_log_file = /var/lib/mysql/bmo_query.log


(Sven Dowideit) #4

I wonder what the permissions to localhost/data look like.


(Qebetty) #5

I was able to start mysql service after running:

./mysql_install_db --user=bugzilla --ldata=/var/lib/mysql/
./mysqld_safe --datadir=/var/lib/mysql/ --user=bugzilla

But Bugzilla tables were lost to resolve this problem, I’ve created again the user and database for Bugzilla after that, I’ve executed the checksetup.pl file in order to create Bugzilla tables and set the admin user.