Access Denied when opening phpMyAdmin

前端 未结 19 607
野的像风
野的像风 2020-12-09 05:47

What could be the problem of my mysql database server in WAMP.

I can\'t open it. The error says:

MySQL sai         


        
相关标签:
19条回答
  • 2020-12-09 05:51

    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.

    0 讨论(0)
  • 2020-12-09 05:56

    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.

    0 讨论(0)
  • 2020-12-09 05: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.

    0 讨论(0)
  • 2020-12-09 05:59

    I stopped mysql by

    sudo service mysql stop
    

    and then started lampp using:

    sudo /opt/lampp/lampp start
    

    And everything works fine

    0 讨论(0)
  • 2020-12-09 05:59

    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.

    0 讨论(0)
  • 2020-12-09 05:59

    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.

    0 讨论(0)
提交回复
热议问题