aaPanel_Jose I have removed /www/server/data and /www/server/mysql directories, reinstalled mysql, it did not start because there was permission error on mysql.sock file. Sorted out permissions. And mysql started to work again.
Already reset the mysql root password from panel, it started to work for phpmyadmin.
However the databases shown in database section are still there and show 0 byte size. They cannot be removed at all. (Need to know what's the fix for this issue?)
A simple fix is to rebuild the complete server and install the control panel again. But that's not the fix for this solution. I am interested to learn the cause and fix it.