There are so many reasons for the occurrence of the problem while working with MySQL database connection. Using the details listed below we can rectify the problem. There are few things to be checked while working with the problem. The error that you may get and details to be checked is as follows:
If MySQL is working the output should be:
If it is running then you can move onto database and then to the user “roundcube”. In cPanel you can obtained the password for the database from the file “/usr/local/cpanel/base/3rdparty/roundcube”
The database which is listing under the user has to be checked, if it is working.
The tables is checked as follows
The roundcube can be rebuild with the command line if the database or tables is missing. The command used to rebuild roundcube is:
FYI, the force used in the command line is used to rebuild if the results are missing in the address book, signatures, etc. The other option instead of re-build option is restoration if there is a backup.
- FOR BACKING UP THE DATABASE USE THE FOLLOWING:
- FOR DROPPING THE DATABASE:
The command above has to run in MySQL prompt
- FOR REBUILDING PURPOSE:
- TO RESTORE:
- YOU HAVE TO CHECK WHETHER MySQL IS WORKING OR NOT
Code:
/etc/init.d/mysql status
Code:
# /etc/init.d/mysql status
mysqld (pid 837) is running
- FROM THE COMMAND LINE CHECK FOR THE DATABASE CONNECTIVITY
Code:
# mysql –u roundcube –p
The reason for the db error is user password. So this can be modified by changing the password.
- YOU HAVE TO CHECK FOR THE TABLES EXISTING UNDER THE DATABASE
Code:
mysql> use roundcube;
The database is repaired if the entire table exists. To repair a db follow this command
Code:
# mysqlcheck -r roundcube
Code:
/usr/local/cpanel/bin/update-roundcube --force
- IF ROUNDCUBE DATABASE, USER TABLES AND PASSWORD ARE WORKING AND I HAVE SAVED THE ADDRESS BOOK AND OTHERS IN EMAIL ACCOUNTS, THEN WILL I BE ABLE TO REBUILD THE ROUNDCUBE SAFELY?
- FOR BACKING UP THE DATABASE USE THE FOLLOWING:
Code:
# mysqldump roundcube > roundcube.sql
Code:
DROP DATABASE roundcube;
- FOR REBUILDING PURPOSE:
Code:
/usr/local/cpanel/bin/update-roundcube --force
Code:
# mysql roundcube < roundcube.sql