Announcement

Collapse
No announcement yet.

[SOLVED] Mysql --- again, can't connect

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

    [SOLVED] Mysql --- again, can't connect

    I ran into this problem a few weeks ago, described in this thread and "solved" by a full reinstall of Kubuntu 10.04.1 from the CD:

    http://kubuntuforums.net/forums/inde...opic=3113618.0

    Now it's happening again, and I do not want to have to start from scratch! Here's the Konsole output:

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

    Other Konsole outputs (for "service mysql start" and "sysv-rc-conf") are the same as in that thread

    /var/run/mysqld is empty; there is no "mysqld.sock" file. (I don't know what the "(2)" means, but System Monitor shows that "mysqld-akonadi" is running.)

    A Synaptic search on "mysql" shows the following installed:

    mysql-client-5.1
    php5-mysql
    mysql-server
    mysql-client
    mysql-common
    libdbd-mysql-perl
    libqt4-sql-mysql
    mysql-gui-tools-common
    mysql-navigator
    mysql-server-5.1
    mysql-client-core-5.1
    mysql-server-core-5.1
    mysql-query-browser
    libmysqlclient16
    akonadi-server
    libdbi-perl
    librdf0
    rsyslog
    dbconfig-common

    In that other thread GreyGeek suggested complete removals, but doing that with "common" would take out Amarok, Digikam, all sorts of KDE programs like Kleopatra, kmail, Kubuntu-Desktop, etc. I tried "complete removal" of everything EXCEPT "mysql-common" but no deal.

    I have a working Mysql on an old Hardy Heron installation; are there config files (or even that sock file?) that I can copy from that setup to this Lucid?

    -- Werdigo49
    Registered Linux User #291592
    Kubuntu Xenial Xerus (16.04)

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

    I don't know squat about mysql, but if you will put this:

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket
    into Google, you will see what looks like useful sources of help, inlcuding the mysql forum. The issue, AFAICT, doesn't appear to be related to Kubuntu or KDE.

    Comment


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

      Originally posted by dibl
      I don't know squat about mysql, but if you will put this:

      ERROR 2002 (HY000): Can't connect to local MySQL server through socket
      into Google, you will see what looks like useful sources of help, inlcuding the mysql forum. The issue, AFAICT, doesn't appear to be related to Kubuntu or KDE.
      Thanks, dibl. I'm sorry to say that I didn't even think of Googling on this error message. The problem(s) seem(s) fairly common.
      -- Werdigo49
      Registered Linux User #291592
      Kubuntu Xenial Xerus (16.04)

      Comment


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

        Originally posted by dibl
        The issue, AFAICT, doesn't appear to be related to Kubuntu or KDE.
        That may be, dibl, but I have this problem only in Lucid. Installations on different hard disks of two different Hardy-based distributions and a Debian 5 setup run mysql fine.

        I've been working my way down the Google list, from the top (posts from 2005!). So far, no deal. I can't "completely remove" mysql-common without taking out most of my system, including kde-desktop. Why is that, and is it new to Lucid? I think I remember "completely removing" and reinstalling mysql on other systems without trashing everything. I could be wrong about that.
        -- Werdigo49
        Registered Linux User #291592
        Kubuntu Xenial Xerus (16.04)

        Comment


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

          Final report on this: After a great deal of trouble, working through dozens of posts about this error on the mysql forum, this afternoon I solved the problem.

          I had another hard disk with only a bare Lucid on it (nothing that wasn't on the .iso). I installed mysql-client, etc., and mysql worked fine. This afternoon I copied that disk's /var/lib/mysql and /var/run/mysqld directories to this machine. Lo and behold, instead of being empty, ls -l showed both a .sock and .pid file in /var/run/mysqld, so I typed "mysql" in the Konsole, fully expecting the error message I'd seen so often. But mysql opened, MySql Navigator opened the tables, etc.

          I'm sure I'd tried that copying of another machine's /var/run/mysqld but for some reason this time it worked.
          -- Werdigo49
          Registered Linux User #291592
          Kubuntu Xenial Xerus (16.04)

          Comment

          Working...
          X