How to get MySql data from files without phpMyAdmin - mysql

My MySql was not working for 2 hours in xampp.
My logs are
01:37:11 [mysql] Error: MySQL shutdown unexpectedly.
01:37:11 [mysql] This may be due to a blocked port, missing dependencies,
01:37:11 [mysql] improper privileges, a crash, or a shutdown by another method.
01:37:11 [mysql] Press the Logs button to view error logs and check
01:37:11 [mysql] the Windows Event Viewer for more clues
01:37:11 [mysql] If you need more help, copy and post this
01:37:11 [mysql] entire log window on the forums
I have tried almost everything and nothing is working for me and I think I have also made my xampp settings even worse.
So now I will delete xampp and install again.
But wait, my databases are very important.
So is there by which I reinstall xampp and also I have all the databases I need.
I can't start MySql
I can't access phpMyAdmin
So how can I save my data from files?

Good luck trying "open your SQL files" (whatever those are).
The answers as to why MySQL is not running are in your log files.
Yes, you can back up the data files and restore them into a new installation.
We can't tell you where those files are - it depends on how you installed MySQL. This might be defined in C:\Windows\my.ini (you're looking for files named .ibd and .frm).
Make sure the MySQL service is stopped. Move the directory containing these file out of the way, then remove and reinstall MySQL. After that stop the (newly installed MySQL service) edit C:\Windows\my.ini to set the datadir to the ,oved files, and start mysql.

You should open your sql files and look at the data, if it looks fine you can copy your backup folder into a recovery disk like F and reinstall it than copy the backup into your new data and replace new data with your backup you just copied, if the data is corrupt, well you need to go and try: https://dev.mysql.com/doc/mysql-backup-excerpt/5.7/en/myisam-table-maintenance.html But the thing is if it does not work than most likely you need to force INNODB reboots......

Related

Error: MySQL shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by

i am getting this error when i started my xampp application.
Error: MySQL shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.
in order to resolve it i tried to restart my xampp application but it didn't work searched for solution on google and found out in which they said i should delete mysql files and etc and that didn't work as well help me please. thanks in advance.
At first, go to Xampp\mysql then rename the data folder as you want.
Copy the backup folder and rename it as data.
then copy all the database folders from the old data_folder and paste in new data folder
Don't delete any file
Run your xampp. Your xampp will be ok now.

Why won't MySQL start on my XAMPP install?

I've been running without any problem Wordpress locally on my W10 x64 PC for over a week.
I turned on my computer this morning, opened XAMPP 3.2.4 and I am unable to start the MySQL module.
"Error: MySQL shutdown unexpectedly."
At first it says:
16:25:35 [mysql] Attempting to start MySQL service... 16:25:35
[mysql] Status change detected: running
And then this:
16:25:43 [mysql] Error: MySQL shutdown unexpectedly.
I tried changing port, reinstalling services, removing some files in the MySQL data folder (trying to follow the online guides about problems similar to mine) but nothing worked.
When I manually try to start the MySQL service I get the error 1067.
I uploaded the error log file here:
https://drive.google.com/file/d/1q-wQm5a5uChF6_6UCsfVEBFoeSvKwh2E/view?usp=sharing
It seems that you have your first warning at:
2019-11-13 14:00:05 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
Do you have a replication schema woriking? if not, you can rename master.info files to avoid replication.
Besides that you have your first error related to files access:
2019-11-13 14:10:32 0 [ERROR] InnoDB: Cannot open datafile for read-only: '.\virtualnordicdb\wp_commentmeta.ibd' OS error: 203
Can you access that file and the file has correct the write/read privileges
And Finally you have space enough in your hard drive?
019-11-13 14:20:25 0 [Note] mysqld.exe: Aria engine: starting recovery
recovered pages: 0% 10%191113 14:20:26 [ERROR] mysqld got exception 0xc0000005 ;
I was able to fix this by unistalling and reinstalling XAMPP.
I then copied the website folder back in htdocs, and finally went to "mysql>data", copied the database folder of the website and pasted the "ibdata1" file that I had before reinstalling XAMPP.
I came up with this solution thanks to this answer on another post:
https://stackoverflow.com/a/50855748/12367579
I have been to this problem thousands of times.
This problem is related to some custom things such as other programs or duplication.
I can give you several solutions:
Check Control Panel
Maybe you have installed your Xampp several times. Go there and check on the bottom. If there are too many Xampp installs, uninstall them all. Don't forget to save your xampp folder with htdocs and mysql.
Check your programs installed on pc
There are too many suspicious programs like Teamviewer or VMWare that block the port of mysql. Try to uninstall it, and install them again after finishing work with your Xampp.
Changing the port
Go to XAMPP Control Panel and near to MYSQL go to Config > my.ini
Search for port=3306, and replace all occurrences' values with 3336.
After that, go to CONFIG at the top on the right, then to Service and Port Settings, after it at MYSQL tab.
On that tab change the value of port to 3336.
After that click save and then quit your XAMPP.

MAMP MySQL won't start (Windows 10)

I see from reading around this is a very common problem and there are 2 recommended main solutions:
clear the temp files; and
check if another instance of MySQL is running.
Solution 1 - Clear files
I have cleared ib_logfile0, ib_logfil1 and iddata1. When I restart MAMP, it recreates these files but the server does not start.
Solution 2 - Close other instances of MySWL
I am unable to find a way to check if MySQL is already running else where. Reading around (inc MAMP help site), I should use Window task manager to search for "MySQLd" and close any instances that are running, however Win10 seems to have delete the search function from the task manager. A look through the processes did not show any though:
screen shot of windows task manager
Next I have seen people adding "innodb_force_recovery = 1" to my.cnf file. I searched for my.cnf but couldn't find it. Instead I tried adding the line to C:\MAMP\conf\mysql\my.ini and I also tried adding "innodb_force_recovery = 2". Neither worked.
I tried changing the port number that MySQL uses to 3307, that didnt work either.
Finally, I uninstalled and re-installed MAMP - didn't work.
The MySQL error log reads:
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
[Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
[Note] C:\MAMP\bin\mysql\bin\mysqld.exe (mysqld 5.7.24-log) starting as process 9044 ...
I think it would be useful if there is a way to check for instances of MySQL running via the command line, and then if they is one, how to close it from the command line.
Following steps fixed my issue
1. Stop your MAMP Server.
2. Find the db folder for mysql. In my case: C:\MAMP\db\mysql
3. Rename the mysql-bin.index file to mysql-bin_old.index
4. Start your MAMP Server
This question has been answered here:
MySQL Server on MAMP-Windows Will Not Start
The fix posted by this user apparently comes from MAMP support. My problem was identical to yours and it worked for me. The issue related to binary logging, which can be disabled in a configuration file.
Good luck.
This is what worked for me :
Click on Start Servers in MAMP
Manually click on mysql.exe in MAMP installation folder
C:\MAMP\bin\mysql\bin\mysql.exe

How to upgrade MariaDB within Xampp

I want to upgrade to MariaDB 10.2 and I'm using xampp ( I like that mysqld.exe runs in the background and easy On/Off with a single click ). What happens is that the latest version as of now is 3.2.2 and it has MariaDB 10.1.29 comes with it.
I'm looking for a general healthy way to do it.
I've tried those steps that pretty much look good :
Unzipping/installing the new MariaDB then copying the data directory and the config|bat files + phpMyAdmin from the old to the new installation.
After starting for an instant, it shuts down complaining :
13:44:33 [main] Control Panel Ready
13:52:46 [mysql] Attempting to start MySQL app...
13:52:46 [mysql] Status change detected: running
13:52:49 [mysql] Status change detected: stopped
13:52:49 [mysql] Error: MySQL shutdown unexpectedly.
13:52:49 [mysql] This may be due to a blocked port, missing dependencies,
13:52:49 [mysql] improper privileges, a crash, or a shutdown by another method.
13:52:49 [mysql] Press the Logs button to view error logs and check
13:52:49 [mysql] the Windows Event Viewer for more clues
13:52:49 [mysql] If you need more help, copy and post this
13:52:49 [mysql] entire log window on the forums
Notes:
I'm not gonna try some random deletes that are very likely to
make my db tables corrupt (even though I did before and it didn't
work)
Please take notice that if I run the server itself using an unprivileged user
(not administrator) on the command line, it runs as expected.
Furthermore, the status in the Xampp control panel would change to green :
14:00:35 [mysql] Status change detected: running
And I could even shut down the MySQL server from it, by clicking on stop.
If I run Xampp as administrator (which could be a bad idea), I get the same error message above.
Please note also that running MySQL server as an administrator involves security risks.
I know I can run it as a service, but I'd rather like to have instant control over when to turn it On/Off.
The purpose :
Looking for a clean way to upgrade MariaDB within xampp, on windows (Windows7)
I had the exact same issue, how I resolved it was:
Re-installed MariaDB to the x32 version because I installed the x64 first
Copied "my-huge.ini" from "C:\xampp\mysql" to "C:\xampp\mysql\bin\my.ini"
Now everything works as expected, start/stop everything is smooth. I guess there is some specific setting that is not quite correct on the old "my.ini" from XAMMP.
Of course, all this was done after I did these steps:
Be sure all modules are stopped from the XAMPP Control Panel
Downloaded an installer of the latest stable version of MariaDB
Renamed "C:\xampp\mysql" to "C:\xampp\mysql_old"
Installed the downloaded MariaDB to "C:\xampp\mysql"
Copied the following directories to maintain my databases:
C:\xampp\mysql\data
C:\xampp\mysql\scripts
C:\xampp\mysql\share
Run Apache and MySQL module from the XAMPP Control Panel, and done.
For me, I would create dumps of existing databases and uninstall current xampp installation then download newest version of xampp which will of course contain a newer version of mariadb

Error: MySQL shutdown unexpectedly XAMPP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
[mysql] Error: MySQL shutdown unexpectedly.
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper privileges, a crash, or a shutdown by another method.
[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues
[mysql] If you need more help, copy and post this
[mysql] entire log window on the forums
I have Used recommended solution XAMPP - MySQL shutdown unexpectedly
But result showing same.
Can Anyone help?
Thanks In Advance
S K Setia
i did the following
C:\xampp\mysql\data -> multi-master.info
remove content from file and restart mysql
xampp->mysql->data
cut all files from data folder
and paste to another folder
now restart mysql
paste all folders from your folder to myslq->data folder
and also paste ib_logfile0.ib_logfile1 , ibdata1 into data folder from your folder.
your database and your data is now available in phpmyadmin..
Man, if you have MySQL server install and running, stop it. The error occured because of conflicting MariaDB and the other server.
Solution:
Check MySQL Error Log
Start MySQL on XAMPP Control panel.
Check the My SQL Error log “mysql_error.log” by clicking on the Logs button on XAMPP control panel.
Go to the “data” directory in the mysql database. I installed XAMPP on D: drive on my computer & the mysql “data” directory location of my computer was “D:\xampp\mysql\data\”. You may have different location.
Take Backup of MySQL “data” Folder
First of all you should create a backup of the “data” folder using any compression software.
Give a name like “data_backup.zip” or any type of compression you wish.
I used winrar compression software to compress & backup mysql “data” folder.
Rename the “data” folder
Rename the “data” folder to “data-oldfiles”.
This is very important to rename the data directory to any new directory name.
Create a new “data” folder
Create a new folder and give the folder name as “data“
To solve the problem we need to create a new “data” directory in the mysql database.
Copy content from “backup” folder
Go to the “backup” folder and copy all files.
Paste the files from backup folder to data folder
Now start the MySQL database from XAMPP.
Now, your MySQL database will start properly without showing any error.
Transfer all MySQL projects Database, Data file & Log files
If you have many database which was used for various projects, then you have to transfer all database from “data-oldfiles” folder to “data” folder.
Copy all databases from the data-old files and paste to the data folder.
Now you have to copy the data file “ibdata1” & all log files “ib_logfile0, ib_logfile1 ” from data-old files folder to the data folder. If you have many id_logiles then copied all of them.
MySQL error This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Start MySQL from XAMPP
Now Start MySQL from XAMPP.
Go to phpMyAdmin to check all databases are available & working.
Now start your any website project from localhost to check the MySQL database.
The Problem is solved:
Now you will see the problem is solved and the error message “Error: MySQL shutdown unexpectedly.” will not show again.
If you have any question on this issue please feel free to ask any question in the comments section.
I tried to fix this issue with the all methods in
here.
But they didn't fix my issue.
In my case, I solved with this way ~
Firstly: In the XAMPP control panel, press the 'Config' button and after that press 'my.ini'.
Secondly: In this "my.ini" file, find the drive-path.
Change Drive path
I installed xampp on "C:\xamp" , but in the "my.ini" file all the paths were started
with "E:\xamp..." So I replaced "E:\xampp" with "C:\xamp".
Because I had installed xampp on "E:\xamp" long time ago.
Thirdly . And then restart the xampp.
"WoW~" it was fixed!!!