Announcement

Collapse
No announcement yet.

[SOLVED] Mysql --- can't connect

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Mysql --- can't connect

    My first try at opening Mysql after upgrading to KDE 4.5.1 with my username failed... so I tried as root and this was returned:

    john@AMD2400:~$ mysql -u root -p
    Enter password:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    john@AMD2400:~$

    I looked at /var/run/mysqld and it is empty: no sock file. I'm also puzzled by the (2); does this indicate mysql is already running and in use, perhaps by Amarok or Digikam (neither of which is actually opened)?

    It's been a few days since this upgrade, and the machine has been restarted (and actually turned off) several times since then.
    -- Werdigo49
    Registered Linux User #291592
    Kubuntu Xenial Xerus (16.04)

    #2
    Re: Mysql --- can't connect

    Try:
    sudo service mysql start
    to get it going. Then you'll see the sock.

    You can run in a Konsole
    sudo sysv-rc-conf
    and see all the available services, and if they are on or off, and the ability to turn them on or off.
    It's in the repository if you don't have it installed.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Mysql --- can't connect

      Thanks! I didn't have sysv-rc-conf installed but now I do, and it looks like a handy utility.

      But... here's the latest Konsole output

      john@AMD2400:~$ sudo service mysql start
      [sudo] password for john:
      mysql start/running
      john@AMD2400:~$ mysql
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      john@AMD2400:~$ mysql -u root -p
      Enter password:
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
      john@AMD2400:~$

      Dolphin won't let me look in /var/run/mysqld, but "sudo ls -l /var/run/mysqld" shows "Total 0."

      I had this working (and was using MySql Navigator) before the upgrade.
      -- Werdigo49
      Registered Linux User #291592
      Kubuntu Xenial Xerus (16.04)

      Comment


        #4
        Re: Mysql --- can't connect

        It looks like some config files got stepped on.

        In cases like this I usually COMPLETELY remove the app and then reinstall it.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Re: Mysql --- can't connect

          Originally posted by GreyGeek
          It looks like some config files got stepped on.

          In cases like this I usually COMPLETELY remove the app and then reinstall it.
          That was going to be my next move! Thanks again, GreyGeek! I'll report back, but I bet that will do the job.
          -- Werdigo49
          Registered Linux User #291592
          Kubuntu Xenial Xerus (16.04)

          Comment


            #6
            Re: Mysql --- can't connect

            Originally posted by werdigo49
            Originally posted by GreyGeek
            It looks like some config files got stepped on.

            In cases like this I usually COMPLETELY remove the app and then reinstall it.
            That was going to be my next move! Thanks again, GreyGeek! I'll report back, but I bet that will do the job.
            Success... but what a day. I "completely uninstalled" mysql, but the reinstall froze (I left it for a couple of hours, and no change). When I punched the reboot button, on the restart "Kubuntu" flashed briefly and the screen went and stayed black. I reinstalled from the CD (I always keep the /home partition separate so that was OK) and spent most of the day bringing everything back.

            GreyGeek suggested configuration files... When I upgraded this new installation to KDE 4.5.1, I was asked if I wanted to replace the old configuration files (kdmrc, I think); the default was NO, but I chose YES. I then realized that when I upgraded the original installation to 4.5.1 I also chose to override the default. That was undoubtedly the ERROR that led to this whole adventure. Live and learn... maybe.

            Anyway, I finally got the latest versions of my software reinstalled, and mysql is working fine. Once again, thanks to GreyGeek for the kind suggestions and advice.
            -- Werdigo49
            Registered Linux User #291592
            Kubuntu Xenial Xerus (16.04)

            Comment

            Working...
            X