Results 1 to 7 of 7

Thread: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

  1. #1

    Default MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    Since I ran the latest patches updates on Tumbleweed any php application in my websites that tries to connect to a MySQL database on the same host (localhost) gives a permission error:

    DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    This appears only in the system log, the database log records nothing.

    From the CLI interface I can access databases with the same user ids I have on the php application successfully and read tables and run selects no problem.

    I am not sure this is necessarily a MySQL issue because the database log is recording nothing and I am not running either apparmor of firewall on this particular server.

    Any ideas on what can cause this?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    From your description,
    It sounds to me that the problem is in your PHP, not MySQL.

    And, that would be entirely dependent on how your PHP website is written.
    So, I don't know that anyone can really help you, you'll have to talk to your website coders/authors if possible, or dig into that part of your website yourself.

    Or, if your situation is critical and/or beyond your expertise you may want to just roll back (BTRFS?)

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    The two websites in questions are standard open source packages Roundcube Mail and Word Press. I am not a php developer (I never went past C or shell script programming),
    and I tend to agree with your assessment it may be dependent on the php, or maybe the apache mod_php module because connecting locally from the MySQL CLI works just fine.

    Rolling back may be a problem because that was the first time I updated tumbleweed, so rolling back 1700+ patches would be equivalent to starting from the DVD distribution. However, I am considering the following two other options:

    1) Falling back to a Leap distribution, which I have on a second machine and it works just fine with Word Press.
    2) Try mariadb or postgreSQL.

    Any advice?

    Quote Originally Posted by tsu2 View Post
    From your description,
    It sounds to me that the problem is in your PHP, not MySQL.

    And, that would be entirely dependent on how your PHP website is written.
    So, I don't know that anyone can really help you, you'll have to talk to your website coders/authors if possible, or dig into that part of your website yourself.

    Or, if your situation is critical and/or beyond your expertise you may want to just roll back (BTRFS?)

    TSU

  4. #4

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    Hi, I have exactly the same problem after last update. My local users can not connect to MySQL with "permission denied".

  5. #5

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    My solution was chmod g+rwx /var/run/mysql & chmod o+rx /var/run/mysql. It works now.

  6. #6

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    Have you tried from the command line client? It works for me, only from php apps through apache2 it fails.

    Quote Originally Posted by fzemanec View Post
    Hi, I have exactly the same problem after last update. My local users can not connect to MySQL with "permission denied".

  7. #7

    Default Re: MySQL DB Error: SQLSTATE[HY000] [2002] Permission denied (GET /)

    Fantastic! It worked for me as well, thank you so much!!

    Quote Originally Posted by fzemanec View Post
    My solution was chmod g+rwx /var/run/mysql & chmod o+rx /var/run/mysql. It works now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •