Remember once Windows MySQL recovery

0x00 event

Because the local server hardware fails, resulting in a Windows system development environment hung up, and the state can not be restored within a short time.

Contingency plan is to use the system on the reconstruction of the cloud development environment.

Developers say the database data sets that need to hang the Windows development environment, because only some of the data that environment there. So find a screwdriver to remove the hard drive, removable hard disk cartridge with the data directory database to pull out, because the Windows environment is using MySQL as a database to store data, so be prepared to use "cold standby" approach to export data.

I installed with Linux systems in a MySQL, the service will stop Windows backup database covering the entire data directory into the data directory, then restart the service, failed to start:

Jan 15 12:01:30 iZo7e61fz42ik0Z mariadb-prepare-db-dir[7537]: Database MariaDB is probably initiali
Jan 15 12:01:30 iZo7e61fz42ik0Z mariadb-prepare-db-dir[7537]: If this is not the case, make sure th
Jan 15 12:01:31 iZo7e61fz42ik0Z mysqld_safe[7567]: 190115 12:01:31 mysqld_safe Logging to '/var/log
Jan 15 12:01:31 iZo7e61fz42ik0Z mysqld_safe[7567]: 190115 12:01:31 mysqld_safe Starting mysqld daem
Jan 15 12:01:32 iZo7e61fz42ik0Z systemd[1]: mariadb.service: control process exited, code=exited st
Jan 15 12:01:32 iZo7e61fz42ik0Z systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.

Followed by this error, the Internet to find some way still failed to solve.

0x01 recovery

So thinking is not a system environment, and then another on a Windows machine installed MySQL, reproduce before it sets Windows database environment, try again in a cold standby mode export development data.

After installing MySQL stop the service:

Contents covered:

No way to password to start the service, after the execution of the command terminal will hang live:

!

Then open a terminal login database export SQL:


problem solved.

Summary: The data migration problem in the Windows environment and import in MySQL Mysql Linux environment in the data directory, resulting in Linux can not run MySQL service and thus can not export data, in the author's workaround is to restore the environment to its own - Create MySQL service in Windows, the data cover into resolve.

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160095.htm