Results 1 to 4 of 4

Thread: PHP Cannot Connect to MySQL After Update

  1. #1

    Unhappy PHP Cannot Connect to MySQL After Update

    Hello,

    Upgraded using Yast earlier today which changed MySQL to version 5.6.36 and now PHP no longer connects to MySQL at all. Even phpMyAdmin cannot connect!

    MySQL is running, although I restarted it and rebooted from good measure. It is possible to use MySQL interactively, select databases and run queries, so MySQL itself is working.

    PHP Fails at connection:

    Code:
    $link = mysql_connect("localhost", $user, $pass);
    if (!$link) die( "Error connecting to database: ".mysql_error());
    This worked just yesterday before the upgrade but now mysql_error() returns "Permission denied".

    WTH is going on? I never had a MySQL or PHP upgrade fail via Yast and I don't see a way to roll back, nor do I know if it is PHP or MySQL's fault.

    Please help. This is urgent, my work is stalled.

    Thanks in advance,
    Last edited by malcolmlewis; 18-May-2017 at 08:23.
    - Itai
    http://www.cybernium.net

  2. #2

    Default Re: PHP Cannot Connect to MySQL After Update

    Last edited by wolfi323; 15-May-2017 at 09:43. Reason: Added link to bug report

  3. #3

    Default Re: PHP Cannot Connect to MySQL After Update

    Quote Originally Posted by wolfi323 View Post
    Talk about landing on a fresh bug! That was it.

    Thank you so much!!!
    - Itai
    http://www.cybernium.net

  4. #4

    Default Re: PHP Cannot Connect to MySQL After Update

    I am facing this bug on 42.1 and 42.2.

    To make things easier for who is looking for a solution:
    It's a permission problem in /var/run/mysqld.
    "But resetting the umask in mysql-system-helper regarding to the instructions there makes it work after the next reboot and manually setting /var/run/mysqld to mode 755 works immediately. "

Tags for this Thread

Posting Permissions

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