>> Fastbase Business Software Ltd

Fastbase Accounting System - Online Manual

MySQL Data Recovery

Document 103350/1

Entered Wed, 4 Jun 2003 11:04 by Peter Campbell
Updated Tue, 29 Jun 2010 13:08

Occassionally the mysql server will crash (due to hardware or software problems) and the database must be checked and rebuilt to ensure everything is ok.
All users should exit FastBase (if they haven't already been thrown out).

Stop the FastBase Remote Server program.

For windows servers do the following from a command ("cmd") prompt:

1. Stop the mysql server (it may have stopped already if crashed)
net stop mysql

2. Change to the data directory, usually this is c:\mysql\data\$company_name$ (check for the database name and location in the setup.dat file, see setup(backup_destination)).
cd \mysql\data\fastbase

3. Type in "c:\mysql\bin\myisamchk -o *.myi". This command repairs the whole database.
Note: we use the "-o" option above (case sensitive). You can use the "-r" option but "-o" finds and fixes more problems (see the mysql documentation).

4. Type in "c:\mysql\bin\myisamchk -s *.myi" This command checks all files and only outputs errors. If any errors are reported run the -o option (above) again and continue until there is no output. Shouldn't need to run this command more than twice.

After finding errors it may be a lot quicker to note down only the database tables with errors then repair them individually. Follow the instructions given in the output that the myisamchk program reports.

5. Restart the mysql service:
net start mysql

After running this also run "OPTIMISE DATABASE" from within FastBase system menu (PCS log in). This is not required but recommended.

Once FastBase is started it is also recommended to run the "Find Orphaned Transactions" option (Utilities - Tests menu).

Start the FastBase Remote Server program.

For additional information about MySQL see the MySQL web site.

Online documentation: enter keywords to search for: