Fixing Akonadi's warning of the non-existing leap second table

Posted by hkwint on Nov 19, 2010 1:41 PM
LXer Linux News; By H.Kwint - The Netherlands


LXer Feature: 19-Nov-2010



Ever since I installed Kontact 4.5, it has been showing an MySQL warning when starting. The exact error in the logs is:

Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them

While it's only a warning, I don't like to have my logs filled with warnings. Hence, I went on a hunt to prevent this warning. Lots of posts said this issue is fixed in newer versions (certainly not for me!), or it doesn't matter. But that wasn't good enough for me so I felt relieved when I found a workaround yesterday, which I shall explain below.

Now, please mind I'm only a noob when it comes to databases and MySQL. So as a result I may be using the wrong terms, but I'll try anyway:



Besides my desktop, I recently hired a Virtual Private Server. It runs Debian Lenny, and I installed MySQL on it as well. Normally when connecting, this is done using the socket "/var/run/mysqld/mysqld.sock", the 'default instance' of MySQL.
Akonadi however uses its own 'local instance' of MySQL, which also uses another socket. Now, let's find out the difference between the two. We start with the Debian server.



  1. First, we connect to MySQL as root:
    $ mysql -u root -p
  2. Then, we list all databases:
    mysql > show databases;
  3. It shows a database called 'mysql' exists. This one stores settings of MySQL itself. Let's use it:
    mysql > use mysql;
  4. So, let's see which tables are in this database:
    mysql > show tables;
  5. Now, we see a time_zone_leap_second table is present!


Now, let's try the same with the local Akonadi MySQL instance: Step 1 becomes



  1. mysql -S ${HOME}/.local/share/akonadi/db_misc/mysql.socket


However, when performing step 2, we notice there's no database called 'mysql' here, so there can't be a leap second table in it as well! Luckily, fixing the issue is easy. In a shell, just enter



  • $ mysql_install_db --datadir=${HOME}/.local/share/akonadi/db_data/


and you should be fine! You can use the commands shown above to check the table is really existing in Akonadi's local MySQL database now.

Return to the LXer Features

This topic does not have any threads posted yet!

You cannot post until you login.

LXer

  Latest Features
ubuuser: The good and bad of Ubuntu 13.04 beta 2
Apr 15, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 10-Mar-2013
Mar 11, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 03-Mar-2013
Mar 03, 2013

: Ubuntu Touch Developer Preview released
Feb 21, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 17-Feb-2013
Feb 18, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 03-Feb-2013
Feb 04, 2013

Nick Black, SprezzOS Project Hacker-in-Charge: SprezzOS emerges, promising new-school tech with old-school gumption
Feb 02, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 27-Jan-2013
Jan 28, 2013

Scott Ruecker (Phoenix, U.S.): LXer Weekly Roundup for 20-Jan-2013
Jan 20, 2013

ubuuser: Ubuntu releasing smartphone OS has better chance than other platforms
Jan 09, 2013


View all

  Search Features

Search LXer Features:

[ Copyright © LXer | All times are recorded in Central Daylight Time (CDT) ]

[ Contact Us | Privacy Policy | Terms of Service | About us | rss | Mobile ]

Login