MySQL database

 

Restart of MySQL service


/etc/init.d/mysqld restart

 

Recovery of database password


cat /data/support/ispadmin/config/config.php | grep DBPASS

 

Database table correction


Some files with system database tables may be damaged after “hard restart” of server.
When you restart MySQL database an error message is displaying a damaged table. Thus if you encounter the notifications while working in the system, login to the command line environment and enter the following command for repairing the table:


First stop the database


/etc/init.d/mysql stop

 

Database table correction


myisamchk -o -f /var/lib/mysql/ispadmin/CRASHED_TABLE.MYI

 

Example

myisamchk -o -f /var/lib/mysql/ispadmin/accesslog.MYI
- recovering (with keycache) MyISAM-table '/var/lib/mysql/ispadmin/accesslog.MYI'
 
Start the database again


/etc/init.d/mysql start

 

Or you can repair tables when MySQL is running with

 

mysqlcheck -u ispadmin -p ispadmin

 

You will be asked for database password, then a complete database check will be performed, including all tables and their reparation in case of minor errors.

Repair a certain database with

 

mysqlcheck -r -u ispadmin -p ispadmin table_name

 

CONTACT

NET service solution, s.r.o.
Žerotínova 3056/81a
787 01 Šumperk
Czech Republic