Announcement

Collapse
No announcement yet.

MySQL installed by default? Questions about config and impact to Akonadi apps.

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

    MySQL installed by default? Questions about config and impact to Akonadi apps.

    I just did a fresh installation of Kubuntu 14.04.3 LTS from an .iso file, and at first glance, I thought MySQL was already installed by default, but I ran into errors trying to connect. I did some more research and think I have a better idea now, but can someone review my findings and questions below?

    Is this the right command line to see what packages are installed (I mean in general as well, but in this case, packages related to mysql)?

    Code:
    $ dpkg -l *mysql*
    Here is the output:

    Code:
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                     Version           Architecture      Description
    +++-========================-=================-=================-=====================================================
    ii  akonadi-backend-mysql    1.12.1-0ubuntu1.1 all               MySQL storage backend for Akonadi
    un  libmysql-java            <none>            <none>            (no description available)
    ii  libmysqlclient18:amd64   5.5.44-0ubuntu0.1 amd64             MySQL database client library
    ii  libqt4-sql-mysql:amd64   4:4.8.5+git192-g0 amd64             Qt 4 MySQL database driver
    un  librdf-storage-mysql     <none>            <none>            (no description available)
    un  libreoffice-mysql-connec <none>            <none>            (no description available)
    un  mysql-client             <none>            <none>            (no description available)
    un  mysql-client-5.0         <none>            <none>            (no description available)
    un  mysql-client-5.1         <none>            <none>            (no description available)
    un  mysql-client-core-5.1    <none>            <none>            (no description available)
    ii  mysql-client-core-5.5    5.5.44-0ubuntu0.1 amd64             MySQL database core client binaries
    ii  mysql-common             5.5.44-0ubuntu0.1 all               MySQL database common files, e.g. /etc/mysql/my.cnf
    un  mysql-server-5.0         <none>            <none>            (no description available)
    un  mysql-server-5.1         <none>            <none>            (no description available)
    un  mysql-server-core        <none>            <none>            (no description available)
    un  mysql-server-core-5.0    <none>            <none>            (no description available)
    un  mysql-server-core-5.1    <none>            <none>            (no description available)
    ii  mysql-server-core-5.5    5.5.44-0ubuntu0.1 amd64             MySQL database server binaries
    un  rsyslog-mysql            <none>            <none>            (no description available)
    From the lines starting with ii, I see both mysql-client-core-5.5 and mysql-server-core-5.5 are installed. So that is why I thought the server and client were good to go. But later, I ran apt-cache show on mysql-server-core-5.5, and it says "This package includes the server binaries but doesn't contain all the infrastructure needed to setup system databases.". I tried apt-cache show mysql-server, and that seems to the package I need. Why does mysql-server not show up in the table above?

    When I tried to see if MySQL server was running, I ran "service mysql status" and similar combinations, but they were all unrecognized.

    Code:
    $ service mysql status
    mysql: unrecognized service
    I then tried ps and see mysqld is running:

    Code:
    $ ps -ef | grep mysql
    tv        1848  1845  0 15:25 ?        00:00:03 /usr/sbin/mysqld --defaults-file=/home/tv/.local/share/akonadi/mysql.conf --datadir=/home/tv/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-tv.xMxJT0/mysql.socket
    But when I try to connect using various combinations:
    Code:
    $ mysql
    $ mysql -u tv
    $ mysql -u tv -p
    $ mysql -u root
    I always get the same error:
    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    It looks like the instance of mysqld running is specifically configured for akonadi use. I see its --defaults-file mysql.conf file has skip_networking inside, and from another thread here I read about it using Linux sockets (I assume the one specified by the --socket flag).

    So, am I correct to say that by default, parts of MySQL are installed, but not enough to make it available for general database use? Is the correct next step to apt-get install mysql-server?

    Hypothetically, would I be able to install a newer/older/different version of MySQL side-by-side and use that for my dbs, while Akonadi dependencies would continue using the default version still installed? Or, could I install a new version of MySQL by itself (getting rid of the default version), and have Akonadi apps transition transparently?

    #2
    I suppose the default MySQL packages installed with Kubuntu (mysql-server-core and other mysql packages) are just enough to run akonadi apps, but not for general database stuff. For example, mysql-server and mysql-client are both missing.

    So I ran the following to install the full MySQL server:
    Code:
    sudo apt-get install mysql-server
    This pulls down the client as well.

    Part of the installation kicks off a configuration screen which asks for root password.

    After installation, logged in as root to test:
    Code:
    mysql -u root -p
    and it works.

    But I'm still unable to use
    Code:
    service mysql status
    to check status.

    I had better luck with
    Code:
    ps -ef | grep mysql
    Not sure if there is a better way to check status.

    Also still not sure what will happen to the Akonadi apps if I swap out MySQL versions entirely (not just the newly installed mysql-server and mysql-client, but also the original mysql packages that came with the default install).

    Comment


      #3
      Akonadi uses just the actual binary part of mysql - mysqld, and not any of the daemon bits.
      Theoretically, changing versions should have no effect, but you know how that goes.......






      https://techbase.kde.org/Projects/PIM/Akonadi

      Comment


        #4
        Thanks for the reply. I'll take "theoretically" at this point since I was just curious about changing versions (but not curious enough to actually try it). Maybe I'll need to do that at some point in the future. Anyway, MySQL is installed and everything appears to be normal, so marking thread solved.

        Comment

        Working...
        X