MySQL Forums
Forum List  »  Install & Repo

switch more datadir
Posted by: biagio rea
Date: April 10, 2016 09:56AM

on my development PC
I wish I had more than one datadir to switch by datadir param in mysql configuration file

on windows-wamp I get the target easily
just make several copies of the original data\ folder
eg
D:\db\data1\
D:\db\data2\
D:\db\data3\
switch datadir da my.ini and restart mysqld service

on linuxubuntu I get error
I've done copies of the original folder, keeping permissions and owner
/var/lib/mysql1/
/var/lib/mysql2/
/var/lib/mysql3/
switch datadir by my.cnf, and restart mysqld service


$ sudo service mysql start
start: Job failed to start

/var/log/mysql/error.log

2016-04-10 17:25:38 3655 [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.
2016-04-10 17:25:38 3655 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2016-04-10 17:25:38 3655 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-04-10 17:25:38 3655 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-04-10 17:25:38 3655 [Note] InnoDB: The InnoDB memory heap is disabled
2016-04-10 17:25:38 3655 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-04-10 17:25:38 3655 [Note] InnoDB: Memory barrier is not used
2016-04-10 17:25:38 3655 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-04-10 17:25:38 3655 [Note] InnoDB: Using Linux native AIO
2016-04-10 17:25:38 3655 [Note] InnoDB: Using CPU crc32 instructions
2016-04-10 17:25:38 3655 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-04-10 17:25:38 3655 [Note] InnoDB: Completed initialization of buffer pool
2016-04-10 17:25:38 3655 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2016-04-10 17:25:38 3655 [ERROR] InnoDB: The system tablespace must be writable!
2016-04-10 17:25:38 3655 [ERROR] Plugin 'InnoDB' init function returned error.
2016-04-10 17:25:38 3655 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-04-10 17:25:38 3655 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-04-10 17:25:38 3655 [ERROR] Aborting

thanks from now for the suggestions

Options: ReplyQuote


Subject
Written By
Posted
switch more datadir
April 10, 2016 09:56AM
April 10, 2016 10:44AM
April 10, 2016 05:30PM
April 13, 2016 08:51AM
April 13, 2016 01:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.