I`ve recently encountered an error with my website. My website has been down and I needed a solution fast. Let`s talk about a common mysql error. If you`re checking your website and it doesn`t work, like I did then maybe this article will help you out. It happened to me while yesterday I was checking my website. Suddenly, my website was down and all I could read was the following message: ``Not Allowed``. This was the standard message for all my website pages. I am not an expert in mysql or php, asp or any other web programming language but I guessed that it must be a problem from my webhosting provider ( an issue with their servers ) or it was a problem from my content management system. Since my best friend is a good programmer and a real IT guru I had two options: call the webhosting company or call the all mighty friend. The second options was faster, better and it solved my problem. So I am calling my friend, I am giving him my account info, actually the control panel username and password. He is looking at the mysql error logs and he is telling me that there was a problem with the webhosting company server, it went down and that he saw the ``Too many connections open`` error message. Ok, but this is not my problem, how do I fix this ? Apparently when this server ( which is a rare issue ) didn`t work, my entire mysql database was corrupted or something like that. The solution offered was incredibly fast and ( lucky me ) it restored my entire website as it was before. What my friend did was to fix/repair the mysql database and I am going to share this information with you. If you`re here , probably you`re having a problem and I hope that this article will help you, so let`s hope that your mysql database needs to be repaired/fixed. Before doing anything else, I would strongly advise you to save your mysql database ( make an offline copy on your hard drive ) as it is, just in case that this method will not work. It should work but just in case, it`s better to be prepaired and you also can`t say that I didn`t warned you. Let`s get started, first look for your control panel username and password and login, the login interface look like in this picture
Once you`re in the control panel, you have to look for phpMyAdmin feature. As you can see from the following picture it is under the ``Databases`` option. You need to access phpMyAdmin.
Once you`re logged in, you will need to select a database, make sure that you`re at the first tab, the one called ``Structure``, click on ``Check All`` link and all the tables will be selected. If all of them are being selected, scroll down from ``With selected:`` until you see ``Repair table`` option. Take a look at this picture ( for security reasons I am not going to show the full name of my tables and I overwritted a part of them using the RED COLOUR ), it`s going to look different in your phpMyAdmin ( more or less tables etc. ) but at least you get the ideea.
Now, all you have to do is to click on ``GO`` button, it`s a little hidden on the right side ( down ). This is a picture with this button.
Once you`ve clicked on that button, all errors should be fixed/repaired and you should see a status message which says: ``Your SQL query has been executed successfully``. Like in the following picture.
This is how you can repair/fix mysql corrupt tables from mysql database that contains errors or it blocks your website to work properly. According to my friend, errors like this shouldn`t happen, he was referring at the web hosting company server but it`s always good to know what to if the mysql tables needs to be repaired/fixed using the phpMyAdmin feature from Control Panel. He also advised me to save my mysql database at least once a week ( I wrote a second article for this ), just in case that this trick with the repair mysql database doesn`t work anymore. I am talking about Control Panel but my webhosting account is using cPanel which is a registered trademark. The cPanel® software platform is being used by my webhosting company but I am referring at this platform as ``Control Panel`` so that everyone can understand. Anyway, I really hope that this will help you and if you know another method to repair, fix an mysql database, please let me know.