One of my clients asked me today to make their MySQL installation go back to default database install. Basically they wanted me to get rid of all their databases (in this case test databases) so they can start fresh and go live with only the databases they needed. So here are the steps I followed.
Note: I have installed their MySQL from source and installed MySQL in to /usr/local/mysql folder. Your installation path might be different.
service mysql stop
cd /usr/local/mysql
mv var var.bak
mkdir var
bin/mysql_install_db
chown -R mysql.mysql var
chmod 700 -R var
service mysql start
At this point we should have fresh MySQL db setup.
————————————-
DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. Use at your own risk.
This may be night-mare if you have some InnoDB tables.
Pls be careful.
Safari, how so? can you please elaborate?
It ‘called one of the best photo editing software.
Rich in effects and customization with amazing lighting effects that allow you to make your photos beautiful masterpieces.
Thousands of people satisfied, now for you is under discount.
Take advantage of it, use IMAGIC PHOTO! info and buy–> http://9nl.co/ImagePhoto
“Acne goodbye”: a manual to have perfect skin immediately visit the site–>
http://9nl.co/AcneFreeIn1NightGauranteed
The Complete FroKnowsPhoto 6-Hour Guide to DSLR Video Now you can learn the fast track system used by a world class photographer and videographer to shoot, direct, and produce any type of video with a DSLR, regardless of your current skill level. http://9nl.co/HotNewProduct
Fapturbo number one in the world of automated trading http://9nl.co/Fapturbo
I in addition to my friends have already been viewing the nice helpful hints from your web site and then before long I had a horrible suspicion I never expressed respect to the site owner for those secrets. Those boys appeared to be certainly passionate to see all of them and already have unquestionably been making the most of them. We appreciate you really being simply kind as well as for getting some awesome information most people are really desperate to be informed on. My sincere apologies for not saying thanks to you earlier.