InnoDB: Attempted to open a previously opened tablespace - mysql

I have been working on a problem for a few days now. Our local mediawiki page that sits on our box account, destroyed itself and we've been working to get it online. Using XAMPP Control Panel v3.2.1, the errors were numerous so we decided to update XAMPP (v3.2.2) and move the 'htdocs' and 'mysql/data' files over to the new data base.
First error:
9:50:21 AM [mysql] Attempting to start MySQL app...
9:50:22 AM [mysql] Status change detected: running
9:50:22 AM [mysql] Status change detected: stopped
9:50:22 AM [mysql] Error: MySQL shutdown unexpectedly.
9:50:22 AM [mysql] This may be due to a blocked port, missing dependencies,
9:50:22 AM [mysql] improper privileges, a crash, or a shutdown by another method.
9:50:22 AM [mysql] Press the Logs button to view error logs and check
9:50:22 AM [mysql] the Windows Event Viewer for more clues
9:50:22 AM [mysql] If you need more help, copy and post this
9:50:22 AM [mysql] entire log window on the forums
As it says, I then went to the logs and found this:
2015-11-20 09:50:22 11f8 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.
2015-11-20 9:50:22 4600 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-11-20 9:50:22 4600 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-20 9:50:22 4600 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-11-20 9:50:22 4600 [Note] InnoDB: Memory barrier is not used
2015-11-20 9:50:22 4600 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-11-20 9:50:22 4600 [Note] InnoDB: Not using CPU crc32 instructions
2015-11-20 9:50:22 4600 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-11-20 9:50:22 4600 [Note] InnoDB: Completed initialization of buffer pool
2015-11-20 9:50:22 4600 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-20 9:50:22 4600 [Note] InnoDB: The log sequence numbers 1665234 and 1665234 in ibdata files do not match the log sequence number 50125498 in the ib_logfiles!
2015-11-20 9:50:22 4600 [Note] InnoDB: Database was not shutdown normally!
2015-11-20 9:50:22 4600 [Note] InnoDB: Starting crash recovery.
2015-11-20 9:50:22 4600 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-11-20 9:50:22 4600 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace phpmyadmin/pma__tracking uses space ID: 21 at filepath: .\phpmyadmin\pma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .\wiki\archive.ibd
InnoDB: Error: could not open single-table tablespace file .\wiki\archive.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.
Now this looks like a standard error that I've seen with many different suggestions throughout the web on how to fix it. I will go over them briefly.
The first thing I tried was to follow the suggestions in the log.
The were no permission problems
It is not clear if I need the table or not, OR whether to get rid of phpmyadmin/pma__tracking or archive.ibd. When I got rid of the archive.ibd, the error just past on to another .ibd file.
'innodb_force_recovery=1' was added to my.cnf and this cause a bunch of errors.
The next thing I noticed is that when we built the new database, I got this error in my phpMyAdmin (localhost/phpMyAdmin):
phpMyAdmin error
I'm not sure if this is causing all of my problems or not. I found that people were saying to switch a password to =''. This error might be happening because I'm entering old data folders in a new database. I'm not sure.
The first suggestion on the web was to remove the following files from
\mysql\data:
innodb_index_stats.frm
innodb_index_stats.ibd
innodb_table_stats.frm
innodb_table_stats.ibd
slave_master_info.ibd
slave_relay_log_info.frm
slave_relay_log_info.ibd
slave_worker_info.frm
slave_worker_info.ibd
The 2nd:
I've tried removing 'ibdata1'
None of these have worked.

I had the same problem. I tried all the solution others has proposed, and unfortunately nothing worked.
After spending hours on searching for the solution in Google I finally found this
Open my.ini (my.cnf on linux-based systems and Mac)
Look for [mysqld]
Just below [mysqld] insert innodb_force_recovery = 1
Start MySQL Service
Stop MySQL Service
Remove the line from my.ini (innodb_force_recovery = 1)
Start MySQL Service
Worked perfect in my case.
I hope this will solve your problem.

I got the same error. These are the steps I followed.
Took the backup of \xampp\mysql\data
Removed all the files and folders from data folder except mysql
Quit and started the XAMPP again.
Move the databases from data folder one by one.

try to rename /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0 to /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0.bkp
and /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1 to /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1.bkp

Solution is for MAC 10.11.3 El Captian
Go to /Applications/XAMPP/xamppfiles/var/mysql/
Delete all random files (except the actual database folders)
Restart Apache and MySQL.
This worked for me.

To use the above (Nesar solution) in MAMP (version >= 4), you must first copy the my.cnf file that is inside MAMP/tmp/mysql to the MAMP/conf folder. Only then will it work.

I had a similar problem with Mamp Pro. For me it turned out the correct .idb-files were not located at "Applications/Mamp...". So taking a closer look at the error-log it showed me the files were located at "/Library/Application Support/appsolute/MAMP PRO/db". As I had problems with a database I wasn't using anymore, I just tried to delete the corresponding folder and it worked out. The next step would have been to delete the files already mentioned by the author.
innodb_index_stats.frm
innodb_index_stats.ibd
innodb_table_stats.frm
innodb_table_stats.ibd
slave_master_info.ibd
slave_relay_log_info.frm
slave_relay_log_info.ibd
slave_worker_info.frm
slave_worker_info.ibd
But as mentioned deleting the databasefolder worked out great.

Tgr's answer looks appropriate. The message about permissions etc. is a generic one; the actual error message is
2015-11-20 9:50:22 4600 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace phpmyadmin/pma__tracking uses space ID: 21 at filepath: .\phpmyadmin\pma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .\wiki\archive.ibd
Your wiki database and phpmyadmin database somehow ended up with the same tablespace ID. Each would work fine if the other wasn't present; as it is now, you'll have to renumber one of them somehow.

"Attempted to open a previously opened tablespace." -- That smells like one of these:
There are two copies of MySQL and both are trying to run.
Windows failed to release an 'open' on one of MySQL's files. I used to see that problem. It was cured by rebooting Windows; later by upgrading Windows.

Another solution for the issue discribed above for MAMP Pro, as I found impossible to edit my.cnf properly :
When InnoDB is crashing, spot in the error message the DB that is causing trouble. Here it is phpmyadmin/pma__tracking so the table is the one with the pma_ extension.
Then go to /Library/Application Support/appsolute/MAMP PRO/db/mysql and remove the folder named after the problem causing DB.
Restart your MAMP server.
Once you restarted with success, you can stop servers again, put back the DB folder where it belongs and start the servers again. Everything should be fine again.

I had the same problem, after use recovery database structure ( http://zadpen.com/20-restore-lost-data-in-mysql-using-innodb-engine-without-file-ibdata1.html )
I remove the archive.ibm file and start mysql.
then create archive table in database.

if someone has problems with any of their corrupt tables, this may be a possible solution to their problem, in my case I had the backup of my database so just delete the tables that are the files .ibd then restart MAMP PRO and mysql started correctly. A database backup must be taken into account. hope this helps someone and doesn't waste a lot of time. regards

after 4 hours i got solution without loos any data, please use below to resolve your issue
I had the same problem. I tried all the solution others has proposed, and unfortunately nothing worked.
After spending hours on searching for the solution in Google I finally found this
Open my.ini (my.cnf on linux centos /etc/my.cnf.d/server.cnf)
Look for [mysqld]
Just below [mysqld] insert innodb_force_recovery = 1
Start MySQL Service
Stop MySQL Service
Remove the line from my.ini (innodb_force_recovery = 1)
Start MySQL Service
Worked perfect in my case.
I hope this will solve your problem.

Related

MySQL Not starting with MAMP

I know this might seem a duplicate, but I am struggling.
I managed to start and run Apache and MySQL for one session using MAMP. Come to it again, MySQL will not start.
I have tried various answers on Stack. Reinstalling / moving directories / making sure things are update. The one thing I haven't done, is renaming the 'ib_logfile' - because they are not there!
Anyone have any suggestions?
2017-09-23 20:44:46 7fffa5a753c0 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 ./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.
170923 20:44:46 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
So far I got it working - I change the permissions for the Mysql folder in Mamp to read and write and all the containing folders and it seems to work.
go to /Applications/MAMP/tmp/mysql/ and add new file mysql.pid
restart mamp

MySQL fails to start after updating XAMPP

I recently updated my XAMPP version to be able to use PHP 7.
I had no problems migrating, so I copied the whole directory to my notebook to work on it.
There the MySQL service always crashed on startup. Having returned to my PC today I had to realize that MySQL won't start on my PC anymore.
2017-05-14 19:02:58 8200 [Note] InnoDB: The log sequence numbers 2453615 and 2453615 in ibdata files do not match the log sequence number 2453645 in the ib_logfiles!
2017-05-14 19:02:58 8200 [Note] InnoDB: Database was not shutdown normally!
2017-05-14 19:02:58 8200 [Note] InnoDB: Starting crash recovery.
2017-05-14 19:02:58 8200 [Note] InnoDB: Reading tablespace information from the .ibd files...
2017-05-14 19:02:58 8200 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace bnw/bnwv1_games uses space ID: 29 at filepath: .\bnw\bnwv1_games.ibd. Cannot open tablespace phpmyadmin/pma__export_templates which uses space ID: 29 at filepath: .\phpmyadmin\pma__export_templates.ibd
This should be the interesting part from the error log. A message later it suggests to set innodb_force_recovery > 0, but then it only complains about missing db.MYI (and also MYD and also for server, user, event after creating empty files).
Since the ib_logfiles log sequence number increases by 10 on every attempted start and I'm quite sure there is no corrupted data in the DB, I think it would be enough to manually reset it. How can I do this?
Edit: Complete error log (from another start): https://pastebin.com/T7GRgK4v
Probably this issue is with the below line in [mysqld] section which somehow commented-out/removed from my.ini file:
key_buffer = 16M
After commenting this out this line will be:
#key_buffer = 16M
Please first check your Windows Event Viewer for more clues to the errors in XAMPP Control Panel.
Two issues...
InnoDB had some trouble. You changed innodb_force_recovery? And you changed it back, I hope.
MyISAM is having some kind of trouble with a table? Then do CHECK TABLE on the table in question, then do REPAIR TABLE on that table. That should fix and/or rebuild the .MYI (which contains the indexes for one MyISAM table).

MySQL Server not starting with MAMP

My MySQL Server wont start anymore on MAMP. The solutions I found online said, that I should first quit MAMP, quit the MYSQL process, and start MAMP again.
But there is no MySQL process running in my situation, so this didn't work. Do you have any idea, what else could be the process?
You can find my error log here:
2017-01-20 21:40:03 7fff79bb0000 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 ./yunityproject_wordpress/wp_comments.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. 170120 21:40:04 mysqld_safe mysqld
from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
Just had this issue. Turns out a mysql.pid file was missing from the mamp\tmp\mysql\ folder. uninstalled, reinstalled and everything works. just make sure you delete the old mamp folder.
[coincidence? my mamp-pro license just expired and then this issue happened]

MySQL InnoDB database restore using .frm files and ibdata files

Hi mistakenly I have deleted my MySQL database from Windos XP based PC (this database was used to host a Wiki service using Xampp package). Now I am trying to restore the data so that I can atleast retrieve the TEXT entered in the respective table of Mediawiki package.
After deletion I tried to recover the data using Minitool data recovery software and was able to recover the main schema folder containing .frm files, ib_logfile0, ib_logfile1 and ibdata1 (which was stored under C>xampp>mysql>data).
Now I am trying to restore the database so that I can take a SQL dump and use it accordingly. I have consulted some previous suggestions provided by the experts. Below are the links -
Restoring MySQL InnoDB files on Windows
Stackoverflow answers
But these did not help me very much, not sure what exactly I am missing from the instructions. At the end I was unable to start MySQL service and it failed with the below errors in log -
120823 12:17:04 [Note] Plugin 'FEDERATED' is disabled.
120823 12:17:04 InnoDB: The InnoDB memory heap is disabled
120823 12:17:04 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120823 12:17:04 InnoDB: Compressed tables use zlib 1.2.3
120823 12:17:04 InnoDB: Initializing buffer pool, size = 16.0M
120823 12:17:04 InnoDB: Completed initialization of buffer pool
120823 12:17:04 InnoDB: highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/error-creating-innodb.html
120823 12:17:04 [ERROR] Plugin 'InnoDB' init function returned error.
120823 12:17:04 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120823 12:17:04 [ERROR] Unknown/unsupported storage engine: InnoDB
120823 12:17:04 [ERROR] Aborting
Any help to recover from this situation will be highly appreciated. I am willing to provide some more data if required. [MySQL Server Version 5.5, xampp-win32-1.8.0-VC9]
Oh God finally it's solved :)
Actually I am a novice that's why I could not solve this quickly. Here is the workflow I followed.
I installed a fresh copy of MySQL server. Run Wizard config for transactional database.
I stopped MySQL from Services.msc
Then overwrote the ib* and *frm files (under the schema folder) in C/programdata/mysql/mysql server 5.5/data folder
Updated the my.ini in C/apps/mysql with the innodb_log_file_size=<actual size of iblogfile0>
ran the command mysqld --defaults-file="C:/apps/mysql/my.ini" --standalone --console --innodb_force_recovery=6
once the above completed closed cmd.exe
restarted MySQL service
Opened MySQL workbench and took a dump
Sorry to confuse you all. Thanks again. Let me know if anybody requires any clarity for the above steps.

Access Denied when opening phpMyAdmin

What could be the problem of my MySQL database server in WAMP.
I can't open it. The error says:
MySQL said: Documentation
#2002 - No connection could be made because the target machine actively refused it.
The server is not responding (or the local server's socket is not correctly configured).
I checked the ports, but no other apps are using port 3306 which is dedicated to mysqld.
Here's what mysql.log says:
120728 22:34:40 [Note] Plugin 'FEDERATED' is disabled.
120728 22:34:42 InnoDB: The InnoDB memory heap is disabled
120728 22:34:42 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:34:42 InnoDB: Compressed tables use zlib 1.2.3
120728 22:34:43 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:34:43 InnoDB: Completed initialization of buffer pool
120728 22:34:44 InnoDB: highest supported file format is Barracuda.
120728 22:34:52 InnoDB: Waiting for the background threads to start
120728 22:34:53 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:34:53 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:34:53 [ERROR] Could not open log file
120728 22:34:53 [ERROR] Can't init tc log
120728 22:34:53 [ERROR] Aborting
120728 22:34:53 InnoDB: Starting shutdown...
120728 22:34:53 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:34:53 [Note] wampmysqld: Shutdown complete
120728 22:35:16 [Note] Plugin 'FEDERATED' is disabled.
120728 22:35:16 InnoDB: The InnoDB memory heap is disabled
120728 22:35:16 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:35:16 InnoDB: Compressed tables use zlib 1.2.3
120728 22:35:16 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:35:16 InnoDB: Completed initialization of buffer pool
120728 22:35:16 InnoDB: highest supported file format is Barracuda.
120728 22:35:32 InnoDB: Waiting for the background threads to start
120728 22:35:33 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:35:33 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:35:33 [ERROR] Could not open log file
120728 22:35:33 [ERROR] Can't init tc log
120728 22:35:33 [ERROR] Aborting
120728 22:35:33 InnoDB: Starting shutdown...
120728 22:35:34 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:35:34 [Note] wampmysqld: Shutdown complete
120728 22:35:42 [Note] Plugin 'FEDERATED' is disabled.
120728 22:35:42 InnoDB: The InnoDB memory heap is disabled
120728 22:35:42 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120728 22:35:42 InnoDB: Compressed tables use zlib 1.2.3
120728 22:35:42 InnoDB: Initializing buffer pool, size = 128.0M
120728 22:35:42 InnoDB: Completed initialization of buffer pool
120728 22:35:44 InnoDB: highest supported file format is Barracuda.
120728 22:35:59 InnoDB: Waiting for the background threads to start
120728 22:36:00 InnoDB: 1.1.8 started; log sequence number 74876578
wampmysqld: File '.\mysql-bin.000025' not found (Errcode: 2)
120728 22:36:00 [ERROR] Failed to open log (file '.\mysql-bin.000025', errno 2)
120728 22:36:00 [ERROR] Could not open log file
120728 22:36:00 [ERROR] Can't init tc log
120728 22:36:00 [ERROR] Aborting
120728 22:36:00 InnoDB: Starting shutdown...
120728 22:36:01 InnoDB: Shutdown completed; log sequence number 74876578
120728 22:36:01 [Note] wampmysqld: Shutdown complete
PS: I don't have a Skype. So I think it's not the conflict.
This works:
Stop the MySQL service
Open data folder
Remove both ib_logfile0 and ib_logfile1
Restart the service
Go to your MySQL directory and find mysql-bin.index then clear its content. Everything should work fine after that.
Source
I experienced this problem this morning for the first time while using mysql/easyphp. I tried clearing the contents of mysql-bin.index but that didn't work for me.
I restarted the computer and tried accessing mysql again and had no more issues.
I stopped mysql by
sudo service mysql stop
and then started lampp using:
sudo /opt/lampp/lampp start
And everything works fine
I had similar error. Disconnect from internet, access phpmyadmin, then reconnect internet. This solved my problem.
I found that there are some temporary log files are created in the windows temp directory. If the log file limit has exceeded and there is no more space available from windows to write in that log file, it fires an error of access denied.
Clear files from the temp directory can solve it.
In windows 7, follow the process.
Run >> type %temp% and hit enter >> Select all files and delete >>
Restart WAMP and access PHPMyAdmin.
I am also facing this issue, But disabling firewall resolved this.
But any other approach to solve it ? I dont think that this would be a good solution to run mysql. but till then we can use mysql by disabling firewall.
Maybe mysql is not configured to accept remote connections?
try the following:
Open your my.cnf (/etc/mysql/my.cnf usually) and change the line that says
bind = 127.0.0.1
(If present) to your network ip.
Restart mysqld after that change.
I copied my mysql files (the whole directory structure), from one unix computer to another unix computer. Even though the mysql server was completely off, when I made the copy, I could not get it to start up on the 2nd computer.
I had an error "File ./mysql-bin.000532 not found Errorcode: 2"
Since I had the whole thing backed up, I could afford to delete pieces without any impact. In other words, I can't make it any more DEAD. And I can restore any file I trashed.
From digging on the internet, I found that if I remove ib_logfile0 and ib_logfile1, mysql will attempt to recreate them from scratch. This seemed to move it along. However, it still asked for and failed to find that mysql-bin.000532. In THIS forum I see that file mysql-bin.index is just a text file holding onto all of these mysql-bin.####### files. Emptying it means I will not be looking for missing files. Great. Now it comes up fine.
But think about it. There is a reason for those files I am sure. It is holding onto changes to data. What if you had changes that were not actually dropped to disk? You would lose them. As I said at the start, this is a copy of mysql with it completely OFF. So all of MY changes are in. So I am good to go.
Last thing, I am sure this is covered in some mysql documentation somewhere. I just have not found it yet. My actions were based on guesses and experimentation.
I had the same problem, and I tried all previous suggestions, above.
Finally the problem for me, was related to the hosts file, something I had previously added trying to solve another related issue.
I have been through the exact same situation. Read loads of blog and posts. So far my understanding is that it happens mostly because of permission issues. Ubuntu/Linux deals directory access and their permissions very strictly.
Find out where is mysql directory is, then give it proper access right n permission. refresh you localhost/phpmyadmin it should be working now.
In my case I did following according this blog:
sudo chown -R mysql.mysql /opt/lampp/var/mysql
Please notice here that in the blog it says mysql directory in /var/lib/mysql
But actually directory in my machine was /opt/lampp/var/mysql
So directories can differ. Therefore, point out right directory and give it proper access. It should be working fine after unless there isn't any hidden error attached to it.
I'm assuming you faced the issue possibly because of a recent update of the database.
If that's the case, please simply do the following three steps:
Disconnect from your internet.
Access your MySQL offline as usual.
Once you have logged in MySQL, you can reconnect to the Internet.
I installed MySQL stand-alone (not using any XAMPP/WAMP stack) and got this problem some time ago. I just ran the following command in windows command prompt:
C:\>"C:\mysql\bin\mysqld" --console
where "C:\mysql\" is the installation directory (adjust the path according to your own case). The
--console
displays the process for debugging purposes.
After startup, you should see something like:
C:\mysql\bin\mysqld: ready for connections
Version: '5.7.10' socket: '' port: 3306
For moore, see Starting MySQL Server
These step worked for me:
Open services
Stop MySQL[version] service
Open MySQL properties
If you did a manual install of MySQL (ie not using xampp wamp etc.) then you may want to change startup type to automatic
Go to the log in tab
Select local system account
Press ok
Start the service again
MySQL57 properties screenshot:
I'm having the same problem with Wampserver. It’s worked for me:
You must change this file: "C:\wamp\bin\mysql[mysql_version]\my.ini"
For example: "C:\wamp\bin\mysql[mysql5.6.12]\my.ini"
And change default port 3306 to 80. (Lines 20 & 27, in both)
port = 3306
To
port = 80
When I turned off my McAfee Firewall the problem was fixed
What I need to change in McAfee settings
Firewall -> Settings -> Program Permissions -> Apache HTTP Server -> need to be set to Full or Outgoing
Sometimes you might have multiple webservers running i.e. apache2 and nginx concurrently on same location but different ports. I suggest stopping apache2 or nginx and then restarting the one you prefer before deleting any files.
You can solve this problem by rebooting your system.
In Ubuntu you can use:
reboot
What I did, is:
Uninstall Wamp
Delete the Wamp folder from C
Reinstall Wamp again.