Right, so i've been playing with MAMP and use it to mess around with wordpress plugins and themes. However, I've been forced to keep MAMP running at all times because the moment I restart the server (after the first install of MAMP), mySql doesnt start. It works immediately after reinstalling MAMP, but anytime I stop it, it simply gives me an error. The exact error log is:
150812 10:31:33 mysqld_safe Starting mysqld daemon with databases
from /Library/Application Support/appsolute/MAMP PRO/db/mysql 150812
10:31:33 [Warning] Setting lower_case_table_names=2 because file
system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/
is case insensitive 150812 10:31:33 [Note] Plugin 'FEDERATED' is
disabled. /Applications/MAMP/Library/bin/mysqld: Table 'mysql.plugin'
doesn't exist 150812 10:31:33 [ERROR] Can't open the mysql.plugin
table. Please run mysql_upgrade to create it. 150812 10:31:33 InnoDB:
The InnoDB memory heap is disabled 150812 10:31:33 InnoDB: Mutexes
and rw_locks use GCC atomic builtins 150812 10:31:33 InnoDB:
Compressed tables use zlib 1.2.3 150812 10:31:33 InnoDB: Initializing
buffer pool, size = 128.0M 150812 10:31:33 InnoDB: Completed
initialization of buffer pool 150812 10:31:33 InnoDB: highest
supported file format is Barracuda. 150812 10:31:33 InnoDB: Waiting
for the background threads to start 150812 10:31:34 InnoDB: 5.5.42
started; log sequence number 346953327 150812 10:31:34 [ERROR] Fatal
error: Can't open and lock privilege tables: Table 'mysql.host'
doesn't exist 150812 10:31:34 mysqld_safe mysqld from pid file
/Applications/MAMP/tmp/mysql/mysql.pid ended
I've literally tried everything from killing all mysql processes, to changing port numbers, to restarting both MAMP and the Computer... Nothing seems to work. I even changed the file permission of host.frm to allow all users read&write access.
I have spent hours and hours looking to no avail :( Any suggestions would be HUGELY appreciated!
Thank you!
Shayne
Related
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
My website is hosted over openshift, everything was working fine by then end of the day, I turned off my PC and slept, in the morning I saw I was not able to login to website or see any events.
Then I opened phpMyAdmin to see what is going on, when I clicked my database it says,
--No tables found.
Though, tables names were displayed under database name, I was not able to access either data or structure of the table, I was Screwed!!!
I opened the log files, but couldn't understand it.
Then I googled, how can I get my data back using ibdata1 and iblog flies, but the procedure was tricky. I had a feeling that I lost my data, that was also confirmed after digging a bit.
I want to know why this happened, so it shouldn't happen in future. I couldn't figure out the reason yet.
Here is my log file:-
151218 00:09:24 mysqld_safe Logging to '/var/lib/openshift/56182a0f0c1e6645c6000/mysql//stdout.err'.
151218 00:09:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/56182a0f0c1e6645c6000/mysql/data/
151218 00:09:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/openshift/56182a0f0c1e6645c6000/mysql/data/
151218 0:09:24 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld (mysqld 5.5.45) starting as process 439115 ...
151218 0:09:24 [Note] Plugin 'FEDERATED' is disabled.
151218 0:09:24 InnoDB: The InnoDB memory heap is disabled
151218 0:09:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151218 0:09:24 InnoDB: Compressed tables use zlib 1.2.3
151218 0:09:24 InnoDB: Using Linux native AIO
151218 0:09:24 InnoDB: Initializing buffer pool, size = 32.0M
151218 0:09:24 InnoDB: Completed initialization of buffer pool
151218 0:09:24 InnoDB: highest supported file format is Barracuda.
151218 0:09:24 InnoDB: Waiting for the background threads to start
151218 0:09:25 InnoDB: 5.5.45 started; log sequence number 1595675
151218 0:09:25 [Note] Server hostname (bind-address): '127.4.242.2'; port: 3306
151218 0:09:25 [Note] - '127.4.242.2' resolves to '127.4.242.2';
151218 0:09:25 [Note] Server socket created on IP: '127.4.242.2'.
151218 0:09:25 [Warning] 'proxies_priv' entry '# root#ex-std-node687.prod.rhcloud.com' ignored in --skip-name-resolve mode.
151218 0:09:25 [Note] Event Scheduler: Loaded 0 events
151218 0:09:25 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connections.
Version: '5.5.45' socket: '/var/lib/openshift/56182a0f0c1e6645c6000/mysql//socket/mysql.sock' port: 3306 MySQL Community Server (GPL)
151218 0:09:53 [ERROR] Cannot find or open table ecell/e_users from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.
151218 0:09:53 [ERROR] Cannot find or open table ecell/events from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.
151218 0:09:53 [ERROR] Cannot find or open table ecell/pastevents from
the internal data dictionary of InnoDB the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
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!
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.
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.