You are not logged in.

#1 2016-02-24 16:29:23

kde35
Member
Registered: 2015-04-13
Posts: 71

Can't start second instance of mysqld [solved]

I have a mysqld (from Mariadb) running as service, and I would like to run a second instance of mysqld, with different data directory.  So I made a modified defaults file where I changed all that are supposed to be changed according to this page.  Now, when I tried to launch the second instance of mysqld,
then I got

 mysqld --defaults-file=my2nd.cnf
2016-02-24 16:54:10 3069904704 [Note] Using unique option prefix 'character_set_client' is error-prone and can break in the future. Please use the full name 'character-set-client-handshake' instead.
2016-02-24 16:54:10 3069904704 [Warning] mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'utf8'
2016-02-24 16:54:10 3069904704 [Note] mysqld (mysqld 10.1.11-MariaDB) starting as process 16050 ...
2016-02-24 16:54:10 b6fb0740 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-02-24 16:54:10 3069904704 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Memory barrier is not used
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Using Linux native AIO
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Using generic crc32 instructions
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Initializing buffer pool, size = 64.0M
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Completed initialization of buffer pool
2016-02-24 16:54:10 3069904704 [Note] InnoDB: The first specified data file /var/lib/mysql/recovery/ibdata1 did not exist: a new database to be created!
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Setting file /var/lib/mysql/recovery/ibdata1 size to 10 MB
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Database physically writes the file full: wait...
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Setting log file /var/lib/mysql/recovery/ib_logfile101 size to 5 MB
2016-02-24 16:54:10 3069904704 [Note] InnoDB: Setting log file /var/lib/mysql/recovery/ib_logfile1 size to 5 MB
2016-02-24 16:54:11 3069904704 [Note] InnoDB: Renaming log file /var/lib/mysql/recovery/ib_logfile101 to /var/lib/mysql/recovery/ib_logfile0
2016-02-24 16:54:11 3069904704 [Warning] InnoDB: New log files created, LSN=45883
2016-02-24 16:54:11 3069904704 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-02-24 16:54:11 3069904704 [Note] InnoDB: Doublewrite buffer created
2016-02-24 16:54:13 3069904704 [Note] InnoDB: 128 rollback segment(s) are active.
2016-02-24 16:54:13 3069904704 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-02-24 16:54:13 3069904704 [Note] InnoDB: Foreign key constraint system tables created
2016-02-24 16:54:13 3069904704 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-02-24 16:54:13 3069904704 [Note] InnoDB: Tablespace and datafile system tables created.
2016-02-24 16:54:13 3069904704 [Note] InnoDB: Waiting for purge to start
2016-02-24 16:54:14 3069904704 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 0
2016-02-24 16:54:14 2784987968 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-02-24 16:54:14 3069904704 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
^C^C^C^C^C^Z^Z

^C^C^C^C^C^Z2016-02-24 16:54:45 3069904704 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2016-02-24 16:54:45 3069904704 [ERROR] Plugin 'Aria' init function returned error.
2016-02-24 16:54:45 3069904704 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2016-02-24 16:54:45 3069904704 [Note] Plugin 'FEEDBACK' is disabled.
2016-02-24 16:54:45 3069904704 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
2016-02-24 16:54:45 3069904704 [ERROR] Aborting

Obviously /var/lib/mysql/aria_log_control is used by the other instance of mysqld, but why this new instance of mysqld wants to use this file?

I have, for configuration of the mysqld service,

 mysqld --print-defaults
mysqld would have been started with the following arguments:
--init_connect=SET collation_connection = utf8_general_ci,NAMES utf8 --collation_server=utf8_general_ci --character_set_client=utf8 --character_set_server=utf8 --port=3306 --socket=/run/mysqld/mysqld.sock --skip-external-locking --key_buffer_size=16M --max_allowed_packet=1M --table_open_cache=64 --sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K --read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --log-bin=mysql-bin --binlog_format=mixed --server-id=1 --innodb_data_home_dir=/var/lib/mysql --innodb_data_file_path=ibdata1:10M:autoextend --innodb_log_group_home_dir=/var/lib/mysql --innodb_buffer_pool_size=64M --innodb_additional_mem_pool_size=4M --innodb_log_file_size=5M --innodb_log_buffer_size=8M --innodb_flush_log_at_trx_commit=1 --innodb_lock_wait_timeout=50 

and the configuration that I am trying to use for the 2nd instance is

 mysqld --defaults-file=my2nd.cnf --print-defaults
mysqld would have been started with the following arguments:
--init_connect=SET collation_connection = utf8_general_ci,NAMES utf8 --collation_server=utf8_general_ci --character_set_client=utf8 --character_set_server=utf8 --port=3307 --socket=/run/mysqld/mysqld1.sock --pid-file=/var/run/mysqld/mysqld1.pid --skip-external-locking --key_buffer_size=16M --max_allowed_packet=1M --table_open_cache=64 --sort_buffer_size=512K --net_buffer_length=8K --read_buffer_size=256K --read_rnd_buffer_size=512K --myisam_sort_buffer_size=8M --server-id=2 --innodb_data_home_dir=/var/lib/mysql/recovery --innodb_data_file_path=ibdata1:10M:autoextend --innodb_log_group_home_dir=/var/lib/mysql/recovery --innodb_buffer_pool_size=64M --innodb_additional_mem_pool_size=4M --innodb_log_file_size=5M --innodb_log_buffer_size=8M --innodb_flush_log_at_trx_commit=1 --innodb_lock_wait_timeout=50 

Is there anyway to tell the 2nd instance of mysqld to use where to place aria_log_control?

Last edited by kde35 (2016-02-24 16:49:54)

Offline

#2 2016-02-24 16:49:32

kde35
Member
Registered: 2015-04-13
Posts: 71

Re: Can't start second instance of mysqld [solved]

Actually I should have checked the page of Mariadb rather than that of mysql...
I needed to add a line with "data=...".

Offline

Board footer

Powered by FluxBB