Access Denied when opening phpMyAdmin

2019-01-17 17:15发布

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. Please Help.

19条回答
Melony?
2楼-- · 2019-01-17 17:44

I stopped mysql by

sudo service mysql stop

and then started lampp using:

sudo /opt/lampp/lampp start

And everything works fine

查看更多
做自己的国王
3楼-- · 2019-01-17 17:47

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.

查看更多
Fickle 薄情
4楼-- · 2019-01-17 17:48

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

查看更多
地球回转人心会变
5楼-- · 2019-01-17 17:52

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.

查看更多
贪生不怕死
6楼-- · 2019-01-17 17:55

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

查看更多
在下西门庆
7楼-- · 2019-01-17 17:57

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. This approached worked for me.

查看更多
登录 后发表回答