Article ID: 2266, created on Oct 18, 2007, last review on May 11, 2014

  • Applies to:
  • Odin Business Automation Standard 3.3

Resolution

1) Stop all services:
/etc/init.d/hspc-servicemon stop
/etc/init.d/vzcoll stop
/etc/init.d/taskmand stop

2) Back up:
mysqldump --hex-blob -A > all_databases.sql

3) Move old data:
/etc/init.d/mysql stop cd /var/lib
mv mysql/ mysql.old
mkdir mysql; chown -R mysql:root mysql; chmod -R 755 mysql

4) Modify /etc/my.cnf:
innodb_data_file_path =  ibdata1:1024M;ibdata2:1024M;ibdata3:10M:autoextend
[mysqld]
max_allowed_packet = 256M

5) Init database space:
# /etc/init.d/mysql start
# ls -al /var/lib/mysql
Check output:
-rw-rw----    1 mysql    mysql    1073741824 Jan 30 22:02 ibdata1
-rw-rw----    1 mysql    mysql    1073741824 Jan 30 22:02 ibdata2
-rw-rw----    1 mysql    mysql    10485760 Jan 30 22:02 ibdata3
# /etc/init.d/mysql stop
# killall mysqld-max mysqld_safe --skip-grant-tables &

You no longer have a MySQL database or load privileges.
6) Restore:
mysql> SET FOREIGN_KEY_CHECKS=0;
SET AUTOCOMMIT = 0;
#mysql < all_databases.sql
mysql> SET FOREIGN_KEY_CHECKS = 1;
COMMIT;
SET AUTOCOMMIT = 1;

7) Normal startup:
# /etc/init.d/mysql stop
# /etc/init.d/mysql start

b91f0e51a581aafeed4e0834068081e0 400e18f6ede9f8be5575a475d2d6b0a6 95c731ef6bb58e30865e046f2135d4c1 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF