Access Denied when opening phpMyAdmin

时光怂恿深爱的人放手 提交于 2019-11-28 07:40:28
saleh

This works:

  1. Stop the MySQL service
  2. Open data folder
  3. Remove both ib_logfile0 and ib_logfile1
  4. 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 know it is a quite old question. But given that I have faced the same issue the other day as of 2017, which really freaked me out. I thought this may help some people.

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:

  1. Disconnect from your internet.
  2. Access your MySQL offline as usual.
  3. Once you have logged in MySQL, you can reconnect to the Internet.

Everything should work just fine.

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

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

I hope this is helpful.

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.

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

i had the same problem and these step worked for me

  1. open services
  2. stop MySQL[version] service
  3. open mysql properties
  4. if you did a manual install of MySQL (ie not using xampp wamp etc.) then you may want to change startup type to automatic
  5. go to the log in tab
  6. select local system account
  7. press ok
  8. start the service again

MySQL57 properties screenshot

if you upvote me i can add the photo inline

Well, I had the same issue, I searched on google for any better solution but i found nothing helpful. So, what I did, is: Unistall Wamp, delete the wamp folder from C and reinstalled wamp again. I KNOW is not the best solution but it's still the one that worked for me.

you can solve this problem useing just reboot your system.

In ubuntu you can use

reboot
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!