问题
Every time I install EasyPHP 13.1VC9 it works for a few days and then at random points when I go to turn it on I get this error and I am unable to start MySQL. I have tried running as Admin, and I have tried editing the permissions. Also, when I go to access MYSQL through PHPadmin I get the following error:
#2002 - No connection could be made because the target machine actively refused it.
This is what the log files say:
2013-06-12 23:47:18 4148 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_index_stats uses space ID: 2 at filepath: .\mysql\innodb_index_stats.ibd. Cannot open tablespace userauth/userinfo which uses space ID: 2 at filepath: .\userauth\userinfo.ibd
InnoDB: Error: could not open single-table tablespace file .\userauth\userinfo.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
回答1:
This is a bug with MySQL 5.6.11 - The EasyPHP website says to upgrade to MySQL 5.6.12 to fix this, but I've encountered the same exact issue regardless.
Through some tracking down, I ran across that it's due to shutting down / restarting your computer while EasyPHP is still running (via their Facebook page).
A working solution seems to be the following (source):
- Exit EasyPHP Server
- Delete all ibd files resides in your mysql/data directory.
- Restart the server, make sure it starts (but your MySQL will not be functioning correctly and thus the sites won't display correctly in most cases as there is no database available).
- Stop/Exit the EasyPHP Server
- Copy all the backup ibd files to its respective locations.
- Restart EasyPHP Server.
回答2:
I just had this problem. I was able to restart MySQL by adding a line in the configuration file of MySQL. It's the option 3 of the log file error. I added innodb_force_recovery = 1
to the my.ini file. Then you restart your MySQL server. If it is working properly, you have to go back to your configuration file, delete the line and restart again. It worked for me but I have trouble with user access. I think this bugs come from this version of EastPHP and I couldn't find a way to fix it. I tried uninstalling it and install the 12.1 version instead.
Hope this help !
回答3:
After a power cut and being forced to reboot my win7 PC I couldn't use mySQL on EasyPHP-DevServer 13.1 anymore, the message: “Unexpected end of mysql”:
Tried all answers above and found @Jessiiem answer to work. This is a little how-to-do list, so people can save time, if running into the same problem:
I found the config file here:
C:\Program Files (x86)\EasyPHP-DevServer-13.1VC11\binaries\conf_files\my.ini
and added:
innodb_force_recovery = 1
after
# Uncomment the following if you are using InnoDB tables
Then restarted Easy PHP (Run as Administrator);
Uncommented the config file as @Jessiiem suggested:
# innodb_force_recovery = 1
回答4:
From Official EasyPHP FAQ:
*3. [5.3.3, Vista/Seven] Unexpected end of MySql... See log file?
You need to change the user s permission for the EasyPHP directory
1. Go to 'Computer', open/view Drive C, then double click 'Program Files (x86)'.
2. Right click on 'EasyPHP5.3.0' folder then click 'Properties'.
3. On 'Security' tab click 'Edit' button.
4. Select the user that you are currently using.
5. Under 'Permissions for Users' box, tick 'Full control' on 'Allow' column.
6. And then click 'OK' button to apply the changes.*
http://www.easyphp.org/faq.php#2
回答5:
When I suffered this problem, it was not actually in one version of MySQL. I tried and got in different versions. I think it's an easyPHP issue.
What solved it was to put innodb_force_recovery = 1
code at just the upper part of # Uncomment the following if you are using InnoDB tables
in the MySQL configuration file my.ini
.
With that, I was then able to restart MySQL again. It started working nicely, so perhaps that may work for you.
回答6:
After all methods described above only disabling innodb helped in my case: (EasyPHP 14.1, win 10) in my.ini:
default-storage-engine=MyISAM
default-tmp-storage-engine=MyISAM
innodb=OFF
http://www.chriscalender.com/disabling-innodb-in-mysql-5-6-and-mariadb-10-0/
回答7:
Sometimes opening the eds-mysqld.exe By CMD can tell you what is the couse of problem. I mean open CMD.exe then cd C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\binaries\mysql\bin\ and open eds-mysqld.exe.
My problem was the wrong directory of mysql so there were no error log... .
来源:https://stackoverflow.com/questions/17080868/easyphp-devserver-13-1-unexpected-end-of-mysql