PS: I'm sorry my description is a bit long. I am just trying to give all the information.
At first, I was not able to login to direct admin. I research on the web on what are the causes and found out that directadmin cannot make sessions when the disk is full. I check through ssh and found out that the root directory was indeed full. To be able to login to directadmin and start mysql, I decided to add a soft link of the /var/lib/mysql/ to /home/mysql. Since my database used up the most of the root directory. I move first the /var/lib/mysql to /var/lib/mysql.mark before I created the softlinks. Then move the file from /var/lib/mysql.mark back to /var/lib/mysql.
But still I cannot login through directadmin. I also decided to add a softlink for the directadmin sessions to /home/sessions. Still I it did no allow me to login. When supposed to be it has enough space to store the session data.
Then I notice that some of my databases where not on /var/lib/mysql directory exactly. Instead I find it on /var/lib/mysql.backup directory. I find it odd though I copy /var/lib/mysql/mysql.backup to /home/mysql_backup. And remove /var/lib/mysql/mysql.backup. Thinking it is the backup anyway. Just to clean the disk storage. I also remove the softlinks since I have enough room. Still it did not allow me to login. And found out that mysql is not running and I cannot start it. By this time, I know I have made quite a messed.
Fortunately, I was able to start mysql after asking for help here. It is solve by removing /var/lib/mysql/ibdata1. Since it is the cause of the problem, I guess it is corrupted. Next problem was I cannot login to mysql in terminal. I received access denied for my user account. Luckily, someone help me. I add skip-grant-tables to my.cnf file and restart the service. I was able to view the mysq.user and notice that the db users, for directadmin and for the database I created using directadmin, are not present in mysql.user. When I view the databases present on mysql, my databases are missing.
So I have these following questions:
How can this be that some of the users are missing?
Is the db user stored in another table when it is created using phpmyadmin from directadmin.
What happened to my databases?
Lastly can I restore my databases by just copying from the backup I made before I added the softlinks. I mean copy the /home/mysql_backup to /var/lib/mysql. Since I saw in the /home/mysql_backup the databases I created as well as the mysql default databases.
Is it possible to restore my database using the following steps. The steps are based on this article
Make a copy of /var/lib/mysql /var/lib/mysql.orig
rsync or copy the new files into place. sudo rsync -av /home/mysql_backup/ /var/lib/mysql/.
sudo chown -R mysql: /var/lib/mysql and then start mysql.
I'm sorry my description is a bit long. I am just trying to give all the information. Please enlighten me what I am going to do.