Hi everyone,

I am having trouble installing mysql-server inside a container (lxc). I have the same problem with a fresh Jessie install. so it doesn't seem specific to Devuan.

Basic description of problem:
After unpacking and setting up the packages, mysql is stopped and the root use password is to be set. However, the management database does not exist and/or cannot be created. There are no files in /var/lib/mysql/mysql and it is owned by root. On an successful install (not in a container) that dir is owned by mysql.

The log files show:
160716 22:32:16 [Note] Plugin 'FEDERATED' is disabled.
160716 22:32:16 InnoDB: The InnoDB memory heap is disabled
160716 22:32:16 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160716 22:32:16 InnoDB: Compressed tables use zlib 1.2.8
160716 22:32:16 InnoDB: Using Linux native AIO
160716 22:32:16 InnoDB: Initializing buffer pool, size = 128.0M
160716 22:32:16 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
160716 22:32:16  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
160716 22:32:17 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
160716 22:32:17 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
160716 22:32:17  InnoDB: Waiting for the background threads to start
160716 22:32:18 InnoDB: 5.5.49 started; log sequence number 0
ERROR: 1146  Table 'mysql.user' doesn't exist
160716 22:32:18 [ERROR] Aborting

160716 22:32:18  InnoDB: Starting shutdown...
160716 22:32:19  InnoDB: Shutdown completed; log sequence number 1595675
160716 22:32:19 [Note] /usr/sbin/mysqld: Shutdown complete

160716 22:38:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 160716 22:38:41 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 160716 22:38:41 [Note] /usr/sbin/mysqld (mysqld 5.5.49-0+deb8u1) starting as process 1156 ... 160716 22:38:41 [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.
160716 22:38:41 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
160716 22:38:41 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160716 22:38:41 InnoDB: The InnoDB memory heap is disabled
160716 22:38:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160716 22:38:41 InnoDB: Compressed tables use zlib 1.2.8
160716 22:38:41 InnoDB: Using Linux native AIO
160716 22:38:41 InnoDB: Initializing buffer pool, size = 128.0M
160716 22:38:41 InnoDB: Completed initialization of buffer pool
160716 22:38:41 InnoDB: highest supported file format is Barracuda.
160716 22:38:41  InnoDB: Waiting for the background threads to start
160716 22:38:42 InnoDB: 5.5.49 started; log sequence number 1595675
160716 22:38:42 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
160716 22:38:42 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
160716 22:38:42 [Note] Server socket created on IP: '127.0.0.1'.
160716 22:38:42 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 160716 22:38:42 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

On a successful install, there are no errors about missing tables:
160716 16:27:53 [Note] Plugin 'FEDERATED' is disabled.
160716 16:27:53 InnoDB: The InnoDB memory heap is disabled
160716 16:27:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160716 16:27:53 InnoDB: Compressed tables use zlib 1.2.8
160716 16:27:53 InnoDB: Using Linux native AIO
160716 16:27:53 InnoDB: Initializing buffer pool, size = 128.0M
160716 16:27:53 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
160716 16:27:53  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
160716 16:27:53 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
160716 16:27:53 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
160716 16:27:53  InnoDB: Waiting for the background threads to start
160716 16:27:54 InnoDB: 5.5.49 started; log sequence number 0
160716 16:27:54  InnoDB: Starting shutdown...
160716 16:27:55  InnoDB: Shutdown completed; log sequence number 1595675
160716 16:27:55 [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.

Since /var/lib/mysql/mysql is empty, it seems that the entire database is not being created. Though some files are being created:
# ls -l /var/lib/mysql/
total 28676
-rw-r--r-- 1 root  root         0 Jul 16 22:32 debian-5.5.flag
-rw-rw---- 1 mysql mysql 18874368 Jul 16 22:32 ibdata1
-rw-rw---- 1 mysql mysql  5242880 Jul 16 22:38 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 Jul 16 22:32 ib_logfile1
drwx------ 2 mysql root      4096 Jul 16 22:32 mysql

The container is a "privileged" container. The frontend is interactive. It's got the blue screen for accepting the root user's password.

The error on that screen is:
"Unable to set password for the MySQL "root" user

An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server.


You should check the account's password after the package installation."


After hitting enter, mysql fails to start.

It's obviously a communication error, because the server is not even running according to the log. Why the database is not created is what I am not able to understand.

Any ideas?

Kind regards,

Simon
_______________________________________________
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to