WAMP server orange after inappropriate shut down - php

My computer has turned off due to power loss while the wamp server is running, now when I am trying to turn the server on it remains orange the http requests to server is working, but when I am trying to log in to MySQl I am getting the following error :
#2002 Cannot log in to the MySQL server
I have done some search and all the results was to remove it and reinstall is there any other way?
I am still a beginner so I don't actually know which files I need to show you in order to help me please comment of anything I need to show.
My last log in attempt in mysql log :
2015-11-11 11:08:03 8052 [Note] Plugin 'FEDERATED' is disabled.
2015-11-11 11:08:03 8052 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-11 11:08:03 8052 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-11-11 11:08:03 8052 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-11-11 11:08:03 8052 [Note] InnoDB: Not using CPU crc32 instructions
2015-11-11 11:08:03 8052 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-11-11 11:08:03 8052 [Note] InnoDB: Completed initialization of buffer pool
2015-11-11 11:08:03 8052 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-11 11:08:03 8052 [Note] InnoDB: The log sequence numbers 2671283 and 2671283 in ibdata files do not match the log sequence number 2671293 in the ib_logfiles!
2015-11-11 11:08:03 8052 [Note] InnoDB: Database was not shutdown normally!
2015-11-11 11:08:03 8052 [Note] InnoDB: Starting crash recovery.
2015-11-11 11:08:03 8052 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-11-11 11:08:03 8052 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace coldatabase/item uses space ID: 3 at filepath: .\coldatabase\item.ibd. Cannot open tablespace mysql/slave_relay_log_info which uses space ID: 3 at filepath: .\mysql\slave_relay_log_info.ibd
InnoDB: Error: could not open single-table tablespace file .\mysql\slave_relay_log_info.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

I had similar problems and i solved it by two methods and i am mentioning the better one of the two.
copy c:\wamp folder to any other safe location
let the orginal c:\wamp folder stay in its place
install the wamp server from the same package that you used to install before
start the wamp server
DONE...!!!
(The copy of c:\wamp folder to any other safe location was just for emergency, in case something goes wrong).

Related

Xampp mysql Error: MySQL shutdown unexpectedly

when I starting mysql, giving the following error:
17:43:13 [mysql] Error: MySQL shutdown unexpectedly.
17:43:13 [mysql] This may be due to a blocked port, missing dependencies,
17:43:13 [mysql] improper privileges, a crash, or a shutdown by another method.
17:43:13 [mysql] Press the Logs button to view error logs and check
17:43:13 [mysql] the Windows Event Viewer for more clues
17:43:13 [mysql] If you need more help, copy and post this
17:43:13 [mysql] entire log window on the forums
then, I check the mysql_error.log:
2017-05-03 17:39:39 202c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
170503 17:39:39 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170503 17:39:39 [Note] InnoDB: The InnoDB memory heap is disabled
170503 17:39:39 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
170503 17:39:39 [Note] InnoDB: Memory barrier is not used
170503 17:39:39 [Note] InnoDB: Compressed tables use zlib 1.2.3
170503 17:39:39 [Note] InnoDB: Not using CPU crc32 instructions
170503 17:39:39 [Note] InnoDB: Initializing buffer pool, size = 16.0M
170503 17:39:39 [Note] InnoDB: Completed initialization of buffer pool
170503 17:39:39 [Note] InnoDB: Highest supported file format is Barracuda.
170503 17:39:39 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600674 in the ib_logfiles!
170503 17:39:39 [Note] InnoDB: Database was not shutdown normally!
170503 17:39:39 [Note] InnoDB: Starting crash recovery.
170503 17:39:39 [Note] InnoDB: Reading tablespace information from the .ibd files...
170503 17:39:39 [Note] InnoDB: Restoring possible half-written data pages
170503 17:39:39 [Note] InnoDB: from the doublewrite buffer...
170503 17:39:39 [Note] InnoDB: 128 rollback segment(s) are active.
170503 17:39:39 [Note] InnoDB: Waiting for purge to start
170503 17:39:40 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-72.0 started; log sequence number 1600674
170503 17:39:40 [Note] Plugin 'FEEDBACK' is disabled.
170503 17:39:40 [Note] Server socket created on IP: '::'.
finally, I moved xampp/mysql/backup files into xampp/mysql/data and run mysql again.Then, it worked!But I don't know why.What led to this problem.
Hope someone doubts for me!
I searched on google and tried everything like port changing, delete files, reinstall xampp, copy and paste backup files to mysql/data folder but nothing worked.
I found the best solution to this problem.
Solution:
go to xampp/mysql/data and take a backup of this folder
delete all selected files in the below image
Copy selected files in below image from xampp/mysql/backup and paste it to xampp/mysql/data folder
Now restart your xampp server and it will run like before. no need to delete your database or reinstall your xampp server
If you're not running XAMPP as an administrator, shutting down MySQL can cause corruption which means you have to repair or delete your tables. This can easily be avoided by running XAMPP as administrator.
Open Services on XAMPP Control Panel
Look for the service MySQL80, right click on this service and click Stop
Get back to XAMPP Control Panel and start MySQL
this worked for me.
Open Services on XAMPP Control Panel
Look for the Services > MySQL80,
right click on this Services and click Stop
Get back to XAMPP Control Panel and start MySQL
thanks to #Shahjahan

MySQL service doesn't run

I have a problem with MySQL. WAMP is orange with service online, but not MySQL. It displays the following error:
#2002 - No connection could be made because the target machine actively refused it.
This is the log error:
2015-11-18 22:13:24 7408 [Note] Plugin 'FEDERATED' is disabled.
2015-11-18 22:13:24 7408 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-11-18 22:13:24 7408 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-18 22:13:24 7408 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-11-18 22:13:24 7408 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-11-18 22:13:24 7408 [Note] InnoDB: Not using CPU crc32 instructions
2015-11-18 22:13:24 7408 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-11-18 22:13:24 7408 [Note] InnoDB: Completed initialization of buffer pool
2015-11-18 22:13:24 7408 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-18 22:13:24 7408 [Note] InnoDB: The log sequence numbers 101407365 and 101407365 in ibdata files do not match the log sequence number 101451472 in the ib_logfiles!
2015-11-18 22:13:24 7408 [Note] InnoDB: Database was not shutdown normally!
2015-11-18 22:13:24 7408 [Note] InnoDB: Starting crash recovery.
2015-11-18 22:13:24 7408 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-11-18 22:13:24 7408 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace catalog_estudio/ost_qacomments uses space ID: 70 at filepath: .\catalog_estudio\ost_qacomments.ibd. Cannot open tablespace osticket/ost_content which uses space ID: 70 at filepath: .\osticket\ost_content.ibd
InnoDB: Error: could not open single-table tablespace file .\osticket\ost_content.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.
I tried to find my.cnf but it doesn't exist. I removed the .ibd files but the issue remains the same.
MySQL port on the server is either firewalled, or mysql isn't listening on that port. "actively refusing" means the target machine returned a "connection refused".
Change this file: "C:\wamp\bin\mysql[mysql_version]\my.ini"
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
and MySQL server
[wampmysqld]
port = 3306
socket = /tmp/mysql.sock
You could change port number default 3306 to 3309 like.
UPDATE
mysql.sock is not a simple file which you can just create. MySQL will create on the start by "itself".
Try to start MySQL and then provide us with a full mysqld.log.
I assume that it`s the following and workaround/solution can be found here itself in it:
InnoDB: Error: could not open single-table tablespace file .\mysql\slave_worker_info.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
1) If there is a permission problem in the file and mysqld cannot open the file, you should modify the permissions.
2) If the table is not needed, or you can restore it from a backup, then you can remove the .ibd file, and InnoDB will do a normal crash recovery and ignore that table.
3) If the file system or the disk is broken, and you cannot remove the .ibd file, you can set innodb_force_recovery > 0 in my.cnf and force InnoDB to continue crash recovery here:
1) In [mysqld] section, add the following line:
innodb_force_recovery = 1
2) Save the file and try starting MySQL.
3) when recovery is finished, remove that line which you just added and restart MySQL.

Xampp mysql innodb recovery failed after pc crash

So it's happened to me a few times that i have this issue. I didn't realised why it's happening i just know after restarting pc mysql won't start.
So i was reinstalling xampp and messing around few times untill i got it work. Last time when it happened i looked at mysql.err file and noticed errors are about corrupted files. So i deleted those databases and mysql started
But today i have seen the right reason. I was sitting by pc when it suddenly got frozen and restarted. After that mysql won't start.
Looking at my localhost/xampp status page it says mysql deactivated
Went to check logs, actually mysql.err file and there it says recovery from crash and innodb can't recover from crash.
Here are the logs
2014-03-05 11:18:11 7829 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
2014-03-05 11:18:11 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2014-03-05 11:18:11 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-03-05 11:18:11 8235 [Note] Plugin 'FEDERATED' is disabled.
2014-03-05 11:18:11 8235 [Note] InnoDB: The InnoDB memory heap is disabled
2014-03-05 11:18:11 8235 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-03-05 11:18:11 8235 [Note] InnoDB: Compressed tables use zlib 1.2.8
2014-03-05 11:18:11 8235 [Note] InnoDB: Not using CPU crc32 instructions
2014-03-05 11:18:11 8235 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-03-05 11:18:11 8235 [Note] InnoDB: Completed initialization of buffer pool
2014-03-05 11:18:11 8235 [Note] InnoDB: Highest supported file format is Barracuda.
2014-03-05 11:18:11 8235 [Note] InnoDB: The log sequence numbers 11011943 and 11011943 in ibdata files do not match the log sequence number 11012198 in the ib_logfiles!
2014-03-05 11:18:11 8235 [Note] InnoDB: Database was not shutdown normally!
2014-03-05 11:18:11 8235 [Note] InnoDB: Starting crash recovery.
2014-03-05 11:18:11 8235 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-03-05 11:18:11 8235 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace wpdemo/wp_terms uses space ID: 93 at filepath: ./wpdemo/wp_terms.ibd. Cannot open tablespace wordpress/wp_evg_feeds which uses space ID: 93 at filepath: ./wordpress/wp_evg_feeds.ibd
2014-03-05 11:18:11 7f3ca4a11700 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./wordpress/wp_evg_feeds.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
2014-03-05 11:18:11 7829 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/aleksandar-PC.pid ended
Last time when i got an error i didn't realised it was because of pc crash and i didn't needed files, so i just deleted corrupted database files and mysql started. Problem is now I CAN'T delete any file, i need those databases back and working.
Any suggestions?
So renaming broken files to for example wp_terms.ibd.bkp so mysql can skip those tables and start. Now when mysql recovered and started, i shut it down regularly. Than renamed .bkp files back to normal table files and started mysql back. Now when mysql is shut down regularly it won't check for recovery and started normally. The files that are supposed to be broken are working now. And everything is back to normal. What a logic!

Mysql is not running in xampp

When i install xampp then mysql is started
But now I am having trouble with mysql
My sql is not running
And error log is
2014-01-23 21:45:06 5264 [Note] Plugin 'FEDERATED' is disabled.
2014-01-23 21:45:06 15dc InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2014-01-23 21:45:06 5264 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-23 21:45:06 5264 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-01-23 21:45:06 5264 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-23 21:45:06 5264 [Note] InnoDB: Not using CPU crc32 instructions
2014-01-23 21:45:06 5264 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-01-23 21:45:06 5264 [Note] InnoDB: Completed initialization of buffer pool
2014-01-23 21:45:06 5264 [Note] InnoDB: Highest supported file format is Barracuda.
2014-01-23 21:45:06 5264 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 2472401 in the ib_logfiles!
2014-01-23 21:45:06 5264 [Note] InnoDB: Database was not shutdown normally!
2014-01-23 21:45:06 5264 [Note] InnoDB: Starting crash recovery.
2014-01-23 21:45:06 5264 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-01-23 21:45:06 5264 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: .\mysql\slave_relay_log_info.ibd. Cannot open tablespace wordpress/wp_terms which uses space ID: 3 at filepath: .\wordpress\wp_terms.ibd
InnoDB: Error: could not open single-table tablespace file .\wordpress\wp_terms.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
How can i solve this problem
You can try deleting the ibdata1 file in: C:\xampp\mysql\data
Change 'C:\xampp' as per your xampp installation folder.
Please remember to restart xampp after following the step.
The answer is on your question:
2014-01-23 21:45:06 5264 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: .\mysql\slave_relay_log_info.ibd. Cannot open tablespace wordpress/wp_terms which uses space ID: 3 at filepath: .\wordpress\wp_terms.ibd
InnoDB: Error: could not open single-table tablespace file .\wordpress\wp_terms.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
To put simply, mysql cannot read your .\wordpress\wp_terms.ibd file because of improper shutdown and there is a possibility that the file is corrupted.
If you dont need that database just follow step 3

XAMPP/MySQL: could not open single-table tablespace file .\mysql\innodb_index_stats.ibd after restart of MySQL

I've installed Drupal on my local XAMPP Server. It worked all fine, no problems with including and working with the database/site till i restarted XAMPP. Since then I get the following at my logfile:
2013-09-02 16:18:46 2544 [Note] Plugin 'FEDERATED' is disabled.
2013-09-02 16:18:46 3e8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2013-09-02 16:18:46 2544 [Note] InnoDB: The InnoDB memory heap is disabled
2013-09-02 16:18:46 2544 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-09-02 16:18:46 2544 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-09-02 16:18:46 2544 [Note] InnoDB: Not using CPU crc32 instructions
2013-09-02 16:18:46 2544 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2013-09-02 16:18:46 2544 [Note] InnoDB: Completed initialization of buffer pool
2013-09-02 16:18:46 2544 [Note] InnoDB: Highest supported file format is Barracuda.
2013-09-02 16:18:47 2544 [Note] InnoDB: The log sequence numbers 1600614 and 1600614 in ibdata files do not match the log sequence number 1600644 in the ib_logfiles!
2013-09-02 16:18:47 2544 [Note] InnoDB: Database was not shutdown normally!
2013-09-02 16:18:47 2544 [Note] InnoDB: Starting crash recovery.
2013-09-02 16:18:47 2544 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-09-02 16:18:47 2544 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace drupal/variable uses space ID: 2 at filepath: .\drupal\variable.ibd. Cannot open tablespace mysql/innodb_index_stats which uses space ID: 2 at filepath: .\mysql\innodb_index_stats.ibd
InnoDB: Error: could not open single-table tablespace file .\mysql\innodb_index_stats.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.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
I looked for a solution via google but it seems to be a problem just with the drupal database because it's able to connect with MySQL if I remove the database.
I hope someone could help me :(.
Move (DON'T DELETE) those files, into another folder:
innodb_index_stats.frm
innodb_table_stats.frm
slave_master_info.frm
slave_relay_log_info.frm
slave_worker_info.frm
and .ibd files with the same filename:
innodb_index_stats.ibd
innodb_table_stats.ibd
slave_master_info.ibd
slave_relay_log_info.ibd
slave_worker_info.ibd
Try start MySQL.
You can solve this problem by adding a line in your mysql config file: my.cnf or my.ini (depends on your distro)
just under [mysqld] add this line: innodb_force_recovery = 1
..
[mysqld]
innodb_force_recovery = 1
..
Then restart your MySql Server.
You could have lost some data but you'll get the server working again with your data.
Regards,
dev_khan,
try restarting MySQL in Read-Only mode with the innodb_force_recovery option enabled:
Edit my.cnf - find the line: # innodb_force_recovery = 2
Comment the line in (remove the #)
Restart MySQL to let the MySQL engine repair itself.
Comment the innodb_force_recovery line in again (add #)
Restart MySQL again and you have full access again without a Read-Only-Restriction.
Greetings from Germany
This happens with Wordpress too. It only seems to happen with the latest version as I've rolled back to previous versions of AMPPS and it works fine without throwing up this innodb issue.

Categories