Reinstall mysql in Xampp for Windows 10 - mysql

I was trying to delete other file but mistakenly I did shift+del for my mysql folder under Xampp. Now my entire application running in localhost is not able to locate mysql. My bad!!
Is there any way out to recover that folder or reinstall just the mysql in Xampp. I tried Easeus and Yodot software for folder recovery but none of them proved no luck to detect my permanently deleted folder.
Please suggest me what can be the alternative way out.
P.S. I am having my mysql config file backup saved.

I think the simple and better way is reinstall the xampp e.g to folder xampp2 then move your script into the htdocs of the new install

Related

Xampp shows MySQL shutdown unexpectedly; isn't working unless every time of reinstalling xampp,

My Xampp server is showing "MySQL shutdown unexpectedly". I did follow some solution to this problem but still it doesn't fix. All I have to do is every time I have to use MYSQL I uninstall and reinstall Xampp and thus it works. But need a proper demonstration and solve for the problem I am facing. It's tedious to reinstall every time.
Tried the following the solve from this thread. Stackoverflow_Fabrizio_Valencia_Solve
Rename the folder mysql/data to mysql/data_old (you can use any name)
Create a new folder mysql/data
Copy the content that resides in mysql/backup to the new
mysql/data folder
Copy all your database folders that are in mysql/data_old to
mysql/data (skipping the mysql, performance_schema, and phpmyadmin
folders from data_old)
Finally copy the ibdata1 file from mysql/data_old and replace
it inside mysql/data folder
Start MySQL from XAMPP control panel
Will be grateful if anyone helps me get through this.
Running Xampp as administrator and then re-downloading Apache and MySQL works.
Figured out the solution. Nevertheless, Thanks to the great community!
Please check your anti-virus may be its interrupting the xampp and also the port that xampp is using may be used by some other programs. Skype interferes with XAMPP and WAMP on port 80 so install any port checking tool and figure out which program is causing the issue.
I Hope that your problem will be solved by addressing this.

How to Restoring MySQL database from physical files

Unfortunately I uninstalled Xampp in my windows machine, there are about 50 databases in /xamp/mysql/data folder. I have not taken backup script, but I have a copy of Xamp/mysql/data folder.How can I restore MySQL Databases using that Data Directory.
Thanks in Advance
I was find out solution
Install new xampp
Copy your old database folder from
xampp\mysql\data\databasefolder to Paste in your running xampp folder
C:\xampp\mysql\data
After that stop mysql and apache service then backup your running xampp files ib_logfile0,ib_logfile1 and ibdata1 and store in safe place
Then Copy same file (ib_logfile0,ib_logfile1 and ibdata1) from old
xampp\mysql\data\ and paste in your running xampp server C:\xampp\mysql\data\
Start mysql and apache service Open CMD Fire command
C:\xampp\mysql\bin>mysqldump -u dbusername -p dbpassword dbname>D:\exportdb.sql
stop mysql and apache service and restore your main ib_logfile0,ib_logfile1 and ibdata1 file (check Step 3)
after than again start service and open http://localhost/phpmyadmin/ and import database backup from D:\exportdb.sql
Now your backup is working :)
Install the same Server version again, Stop it , copy the datadir and Start the servrr
I experienced with my Mac, before selling to a friend simply copy the XAMPP folder only to my hard drive.
(NOT SUCCESS) Unfortunately, it was bringing trouble to me, because I tried the following steps:
- I install fresh XAMPP and copy the whole \httdocs and var\mysql to my new Mac, those db only with .frm and .ibd, NOT WORKING, I can't still access the tables inside PHPMyAdmin ...
- I tried to install the same xampp version and repeat the above steps, still NOT WORKING.
- Decided to go to bed.
(SUCCESS)
- This morning, I brought my backup disk and try with Windows 7.
- Install fresh latest XAMPP for Windows, c:\xampp
- I have one of website (folder) from my backup \httdocs and correspond database folder inside \var\mysql are READY in my windows 7, I just want to try with one website then try the rest because I have many projects inside httdocs\ and \var\mysql
- I copy the mention httdocs\ folder to windows c:\xampp\httdocs and copy the \var\mysql to c:\xampp\mysql\data
NOT LAST YET
I copy the ib_logfile0, ib_logfile1, ibdata1 from my backup file to windows xampp c:\xampp\mysql\data
I refresh the http://localhost/mywebsite
WOW WOW DONE ... it's working...
In my case I found pretty straight solution.
I had db files in wamp and ported to laragon
Stopped laragon instance, no apache/mysql was running.
I have simply copied db folder[dbname] "example /mysql/data/dbname" from wamp to laragon "/mysql/data/" folder
Than I started my laragon instance both apache/mysql.
I have checked in phpmyadmin, I can see same database was recovered and now part of current mysql database.

XAMPP MySQL Database Copy

I had to format my Mac as updating OSX Crashed. I had the backup of the XAMPP folder on my disk. Is there a way I can copy some files to the newly installed XAMPP folder and get all databases back?
Do I make any sense?
I tried copying all folder but XAMPP failed to start throwing Requires Admin Privileges
Note: I have no recent .sql backup of the databases.
I once had the same problem. It's not that complicated.
Just copy the folders of database to XAMPP/var/mysql/
That's all.

Mysql database didn't working after overwritting installing wamp.

I am using wamp server. I have made some project and there are some also databases.
I install new window and then i install wamp server in same drive where the wamp sever is.
After installing wamp my project file in "www" are present as pervious but in phpMyAdmin there is only database name is present when I open it there is no table. where the tables gone ???
I check the "wamp>mysql>data". Here the files are present of that tables but it does not show in the phpmyadmin.
I need these tables how can I recover it.
I suggest to you ,use the feature in windows called "restore previous versions" .
Right click the Wamp folder click Restore previous versions and select the most recent date you know it was working,it maybe work for you.
I assume you mean that you did ...
Install new windows.
Install WampServer on new windows
Copy my old\wamp\www folder to the new install
Copy the subfolders in \wamp\bin\mysql\mysql{version}\data to the new install
If this is correct, then dont forget to copy the contents of \wamp\bin\mysql\mysql{version}\data as well. If you are using INNODB database the actual data lives in the ibdata1 file in that folder.

XAMPP NOT WORKING! - OS X Yosemite

I was working with XAMPP 1.8.3-3 on OS X Mavericks. After upgrading to Yosemite Mysql server stopped working. And an upgrade to XAMPP 1.8.3-5 fixed the problem and mysql server starts working.
Now the entire database list is showing on phpmyadmin, but no access to the tables. Its showing “#1146 - Table ‘DB_NAME.TABLE_NAME’ doesn’t exist”.
Unfortunately I don't have any DB backup!
I have the entire XAMPP folder backup. So how I can able to retrieve the mysql tables?
just type /Applications/XAMPP/xamppfiles/bin/mysql.server start
in terminal then start xampp
you can restore if you have all the mysql folders from XAMPP folder. (check /XAMPP/xamppfiles/var/mysql in backup)
if you have var/mysql folder, open and look for database names you had earlier.
there is a separate folder for each database you had earlier. open the folder and it will contain lots of files with table names.
if your old table engine is InnoDB you will see 2 files. with .frm and .ibd extensions.
or if you had MyISM it will contain three file per table which has .frm, .MYD and .MYI extensions.
after you verify you have all the required files in backup, you can start restoring them.
stop mysql
copy required database folder completely and paste it to currently installed folder. (/Applications/XAMPP/xamppfiles/var/mysql/)
start mysql
to restore web files, open htdocs folder in backup and copy required site folder to currentely xampp installed htdocs folder.
This solution worked for me. Good Luck !
Do a clean install. See my answer for my own question. xampp mysql server not starting. The bad part is that I'm not sure if it will save your database the way I explained. What you might try is going to xampp > xamppfiles > var > mysql > 'your database name' and making a copy of the database folder on your desktop and moving it back once you reinstall it. I tried and I think it might have worked had I changed the file permissions. You can also try experimenting to see if it preserves the database if you do this. I would do some serious testing if you really want to save your database before doing this.