Xampp mysql cant run database i already created - mysql

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

Related

Easiest way to have a MySql database to make some queries against a dump file

I have a dump file of a MySql Database (I never worked with MySql, but I am assuming it's similar enough to SQL Server), because I don't want to run my queries in production.
I never created a local environment and I never worked with MySql. I tried to download MySql Workbench, but the GUI is not helping me. In SQL Server I would just connect with localhost and then everything would be fine. It was back then I had a managed PC by my previous organization. I suppose they installed everything to me.
I want to set up it and just go away. It could be in the cloud or locally.

How do I restart a MySQL local instance in MySQL workbench?

I've recently gotten into databases for a class I'm currently in, and I need a little bit of help. I've managed to create a database, and even populate a table with data which I was then able to grab from a node.js project I've made in Atom. Wonderful! When I went to shut it down, all seemed normal but now it won't restart. As in, when I'm in the homepage section of MySQL I double click the local instance I made(I can only assume this is opening the connection to the local instance where my database is stored) but it won't start up. I don't know what I'm doing wrong. Here is an image of the error I'm getting. I can only assume it's because the actual server isn't on but I don't know how to turn it on.
Any help is much appreciated!
Thank you!
As according to the users ikiK, P.Salmon, and Y4glory the issue I was having was that I wasn't actually turning on the server. I was able to do so by going through my Window's Services application, finding the MySQL server and starting it there instead of trying to do so through the workbench.
Once again, thank you to those who commented as that was really helpful!!
I have tried every other way mentioned here and other related posts, but it did not solve my problem, the service just wont start, but the below approach with the mysql-installer did.
For this to work you need to have your installer which you have used earlier to install MySql.
Start your windows mysql installer. For me it was "mysql-installer-community-8.0.20.0"
Then remove/uninstall the SQL Server and remove all configurations
Manually delete the SQL Server folder from "C:\Program Files\MySQL\MySQL Server 8.0."
Start your mysql installer again and install the SQL Server again
You can check now that the MySqL Server has started.
Hope it helps someone.

MYSQL hopelessly corrupted?

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.

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.

MySQL Workbench folder does not exist after improper shut down

This morning I installed MySQL sever (ver. 5.6). I used MySQL Workbench to create schema, users and tables I needed for my development.
After several hours of work I just closed my laptop without closing applications.
When I came home, I realized that laptop in meantime fully shut down (probably ran out of battery).
I tried to run MySQL Workbench application and got error
Workbench Restore: c:/user/.../AppData\Roaming\MySQL\Workbench folder does not exist. I checked hard drive and this folder does exist.
Now, everything is gone, my schemas, tables, users and I can't start Sql server no more.
Any help is appreciated.
Thanks