MYSQL hopelessly corrupted? - mysql

I am using xampp stack to create a website but recently had to upgrade my OS and xampp stopped working.
MySql server would not launch in the new OS. I looked around here for solutions and found a lot that said I should delete the Ibdata file.
I did and it solved my initial problem but now MYSQL is close to useless. Every database is giving an error and trying to create a new one just keeps on loading forever.
Is there any way to fix this? to reset MYSQL to initial state or something? I dont need to recover the databases as they were only tests I just need to be able to create new ones but nothing works anymore.

Related

MySQL 8.0 Deployment with Data Seperate

I have been running MySQL 5.X for several years. Just come to a new server and downloaded V8.0.11.0. I installed it and it asked me no questions about where to keep the data, it has put it all on the C: drive. I want to keep it separate to make backup easier. How do I make the data location move to another disk?
What I have tried:
The old 5.7 method of stopping the server, moving the files, updating
my.ini and restarting. You can't move the files (Access denied) and
the server doesn't start if you change the my.ini file.
mysqld --initialise --datadir="F:\MySQL\Data" (tried forward slashes and double slashes as well)
I can't find any documentation! It's a pretty basic requirement so I'm guessing it must be documented!
OK, I uninstalled MySQL and then ran the installer again. The first question is where do you want to put things! I take it all back, apologies for missing it!

Big mess with databases on my local OSX server

I run mavericks and today i wanted to try and setup Sierra on another partition
I setup apache,mysql,phpmyadmin etc and i thought would be nice idea to use the mysql/data folder of my main mavericks so i can try the server on the Sierra partition by using my databases from Mavericks..
There were some issues related to pid so i thought ok that's enough and i restarted to Mavericks as normal.
From this point start my nightmare.. i had the common error ERROR! MySQL server PID file could not be found! etc.
I decided to update mysql version and the problems still continue, i manage to fix only by delete the _ibdata1 only then mysql started with "success"
But i cannot use the databases now, they are corrupted although i can see them as normal in phpmyadmin (not normal now that i check , the tables are empty)
I have all the old data folder in a backup as before, is there any magic way to bring everything back to normal?
Apart of the pid thing i did not delete anything else , so everything should be there.
The _ibdata1 is about 10GB cause i have a lot of databases (most of them i do not need to be honest.
Please advise

MySql not working in Wamp

Last week my WAMP not working properly when I start it, it goes yellow.. and local host working fine but when I go though phpmyadmin its not working...
After that I try to go on mysql data folder in wamp and delete following files
ib_logfile0
ib_logfile1
ibdata1
And the restart all service it working and goes green but my all database not working.. daily I do that for starting the service and import all the database daily for working
please suggest me the solution of this....
if you are using the wampserver 2.5 uninstall it and
try to follow the instruction on the video (click here) better to understand and follow the instruction carefully
still got error's? I suggest use wampserver 2.2 because wampserver 2.5 has lots of bugs and errors
HOPE it helps you.
You deleted the files that MySQL uses to store the database -- of course your databases aren't going to work. I suggest you restore your databases from a backup. There's no way around it; as long as you are deleting the database files, you're going to have trouble using the database.
About the problems logging in through phpMyAdmin, you can search here for the actual error message or open another question and perhaps get that problem resolved as well.

Xampp mysql cant run database i already created

i installed xampp and planing to use the apache server and the mysql server.
while running the first time, i load the database from phpmyadmin, and it loads fine. after i work with my app i check that the db is updated and it is.
after closing the servers and returning to them later, i have problem to start the mysql server, so i found some helpfull links and followed them...
XAMPP - MySQL shutdown unexpectedly
although it did helped but im not sure the issue is the port. what worked for me is deleting the ibdata1 file.
so why cant i run the mysql the second time? each time i have to delete the file?
following question one, i have problems updating my databases in phpmyadmin, and have to delete the db manually from c:\xampp\mysql\data\"db_name"
and then loading it again through phpmyadmin. im sure this is the wrong way but not deleting it will mess up the db so dont have any other choice at the moment.
please note there are 2 separate questions, but the issue is the same.
thanks

How to to fix XAMPP after deleting too many MySQL databases?

I've been stupid enough to delete too many databases in XAMPP with PHPMyAdmin and now my sites on localhost don't run properly anymore. Please see this screenshot of the main errors
I guess entirely reinstalling XAMPP will fix the problem but that might take much more time than necessary. Preferably, I'd like to just reinstall the MySQL component or perhaps recreate/repair some databases required for XAMPP to function properly. However, it looks as if I can only reinstall XAMPP entirely instead of separate components (and if that's correct, it's probably for a reason...).
Do I have a better option here than a complete reinstall of XAMPP?
OK, fixed it with the kind help of scones.
1) By default (XAMPP 1.8.1 on Windows XP), there seems to be a folder C:\xampp\mysql\backup\phpmyadmin. Just copy-paste this entire folder into C:\xampp\mysql\data.
2) Stop and restart MySQL
3) If you're using WordPress, your pages may be blank since it may think there are no themes available. Go to [frontpage url]/wp-admin/. Now just reactivate the theme you'd like to use and all seems up and running again!
You dropped the database for PHPMyAdmin. If you can just restore that (with a command line mysql tool or any tool that does not rely on a web-interface), you can use phpmyadmin again.