You are not logged in.

#1 2009-11-18 13:20:30

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

MySQL 5.1.40 - configuration file moved

http://www.archlinux.org/news/473/ wrote:

Starting with the mysql 5.1.40 release, the mysql configuration file resides in the /etc/mysql/ directory and the pid and sock files are in the /var/run/mysqld/ directory.
This is to comply with the Filesystem Hierarchy Standard.

Offline

#2 2009-11-18 14:28:04

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

This update breaks MySQL support in PHP and Amarok. Akonadi and MythTV don't start too.
All them are looking for /tmp/mysql.sock when it is in /var/run/mysql/ named mysqld.sock.
I am building mysql 5.1.41 and rebuilding all them.
Sorry for this crap.

Offline

#3 2009-11-18 15:32:17

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: MySQL 5.1.40 - configuration file moved

If you can fix it, mysql-python is also broken with with this update. Thanks!

Offline

#4 2009-11-18 15:39:10

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

mysql-python and akonadi fixed.
btw, I am not sure amarok needs a rebuild.

Offline

#5 2009-11-18 16:34:04

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: MySQL 5.1.40 - configuration file moved

Amarok not working here...

Offline

#6 2009-11-18 16:38:29

estevao
Member
From: Vitória, ES - Brazil
Registered: 2009-10-13
Posts: 100
Website

Re: MySQL 5.1.40 - configuration file moved

gnumdk wrote:

Amarok not working here...

Not working here too. I'm using Mysql 5.1.41-1 and Amarok 2.2.1-1.

Last edited by estevao (2009-11-18 16:39:09)

Offline

#7 2009-11-18 16:56:22

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

did you try to remove your amarok config files? (backup them)

Offline

#8 2009-11-18 17:08:02

estevao
Member
From: Vitória, ES - Brazil
Registered: 2009-10-13
Posts: 100
Website

Re: MySQL 5.1.40 - configuration file moved

bash wrote:

did you try to remove your amarok config files? (backup them)

I removed all Amarok configuration files in my home directory, fully rescan collection again and the problem is still there. Very odd...

Offline

#9 2009-11-18 17:31:56

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: MySQL 5.1.40 - configuration file moved

amarok can't connect to mysql, with a link to mysql.sock, it's ok.

I'm using an external mysql DB, may help wink

Offline

#10 2009-11-18 17:37:50

estevao
Member
From: Vitória, ES - Brazil
Registered: 2009-10-13
Posts: 100
Website

Re: MySQL 5.1.40 - configuration file moved

gnumdk wrote:

amarok can't connect to mysql, with a link to mysql.sock, it's ok.

I'm using an external mysql DB, may help wink

Which link?


Thanks!

Last edited by estevao (2009-11-18 17:38:08)

Offline

#11 2009-11-18 18:25:42

kidoz
Member
Registered: 2009-11-18
Posts: 2

Re: MySQL 5.1.40 - configuration file moved

PHP 5.3.0-5 can not connect to mysql 5.1.41-1. Wait for updates?

Offline

#12 2009-11-18 18:49:51

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

kidoz wrote:

PHP 5.3.0-5 can not connect to mysql 5.1.41-1. Wait for updates?

You need to edit php.ini and set
(line 1215) mysql.default_socket =/var/run/mysqld/mysqld.sock

Offline

#13 2009-11-18 19:08:11

ancide
Member
Registered: 2009-07-09
Posts: 40

Re: MySQL 5.1.40 - configuration file moved

bash wrote:
kidoz wrote:

PHP 5.3.0-5 can not connect to mysql 5.1.41-1. Wait for updates?

You need to edit php.ini and set
(line 1215) mysql.default_socket = /var/run/mysqld/mysqld.sock

My /var/run/mysqld/ directory is empty. No sock file at all.

Any ideas why?

Offline

#14 2009-11-18 19:09:25

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

ancide wrote:

Any ideas why?

did you restart mysqld? look at logs

Offline

#15 2009-11-18 19:13:16

ancide
Member
Registered: 2009-07-09
Posts: 40

Re: MySQL 5.1.40 - configuration file moved

bash wrote:
ancide wrote:

Any ideas why?

did you restart mysqld? look at logs

Never mind what I wrote before. I changed all applications path to the socket file back to /tmp/mysql.sock and also within mysql. And now everything works fine again.

Last edited by ancide (2009-11-18 19:50:35)

Offline

#16 2009-11-18 19:35:16

sulraug
Member
Registered: 2009-01-08
Posts: 8

Re: MySQL 5.1.40 - configuration file moved

I have the updated amarok and akonadi, and they still don't start. Won't be the problem the QT library itself? Maybe we need to compile it again against the new client...

Offline

#17 2009-11-18 20:18:18

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: MySQL 5.1.40 - configuration file moved

Can I ask why you have set the charset to latin1? Everyone is using utf8 today, and I think it is confusing converting to utf8.

Birger smile

Offline

#18 2009-11-18 20:23:50

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

sulraug wrote:

I have the updated amarok and akonadi, and they still don't start. Won't be the problem the QT library itself? Maybe we need to compile it again against the new client...

kdelibs doesn't depends on mysql, then I think it isn't the problem. Akonadi 1.2.1-2  works here and this fixed Amarok too.
Reboot your system.

MindTooth wrote:

Can I ask why you have set the charset to latin1? Everyone is using utf8 today, and I think it is confusing converting to utf8.

Hugo did this. When everything is working I'll change charset and I'll enable the new innodb plugin.

Offline

#19 2009-11-18 21:58:36

sulraug
Member
Registered: 2009-01-08
Posts: 8

Re: MySQL 5.1.40 - configuration file moved

I have akonadi 1.2.1-2 the updated version, but it still tries to connect to /tmp/mysql.sock instead of the new location:

So kopete, amarok, kontact still have problems, some they even don't work:

ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] Unable to open database "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) QMYSQL: Unable to connect"
[akonadiserver] "[

Someone with an idea to solve this? I have also recompiled QT, rebooted, but still nothing...

Offline

#20 2009-11-18 22:02:45

caotic
Member
Registered: 2009-09-23
Posts: 11

Re: MySQL 5.1.40 - configuration file moved

I "solved" my problem with a symlink to /tmp/mysqld.sock. But obviously the sym link will be deleted at every boot.
I have found a file called at ~/.kde4/share/apps/amarok/my.cnf
I wonder if overwiting the mysql default socket path there would fix the problem.
Anyway I have spendend way to much time on this today. I have to get back to work. If someone can give it a shot, please report back.

Offline

#21 2009-11-18 22:07:25

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

sulraug wrote:

I have akonadi 1.2.1-2 the updated version, but it still tries to connect to /tmp/mysql.sock instead of the new location:
So kopete, amarok, kontact still have problems, some they even don't work:

ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] Unable to open database "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) QMYSQL: Unable to connect"
[akonadiserver] "[

Someone with an idea to solve this? I have also recompiled QT, rebooted, but still nothing...

Be sure you haven't my.cnf in /etc/ and /etc/mysql/my.cnf sock file path is right.
Others users fixed this updating to akonadi 1.2.1-2 and mysql 5.1.41-1, then reboot.
maybe remove ~/.config/akonadi and ~/.local/share/akonadi help

Offline

#22 2009-11-19 00:09:29

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: MySQL 5.1.40 - configuration file moved

upgraded to last version of akonadi, don't works here sad
No my.cnf in /etc, my.cnf in /etc/mysql is good...

Adding this to akonadi mysql options fix akonadi: UNIX_SOCKET=/var/run/mysqld/mysqld.sock
But, with a new created user, option is not set and it fails...

For amarok, not working, try to edit my.cnf from amarok folder but no change sad

Offline

#23 2009-11-19 00:36:50

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: MySQL 5.1.40 - configuration file moved

Ok, found a bug:
gnumdk@archlinux:~$ pacman -Q libmysqlclient
libmysqlclient 5.1.41-1
gnumdk@archlinux:~$ mysql_config --socket
/tmp/mysql.sock

There is a bug with libmysqlclient package...

Try to rebuild akonadi after a sed on mysql_config shell script but don't fix the bug...

Look at akonadi source code but nothing about mysql socket (for external mysql).

So, as amarok and akonadi use Qt Mysql Engine, i think we need a fix for libmysqlclient and a new Qt build

Offline

#24 2009-11-19 01:19:37

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: MySQL 5.1.40 - configuration file moved

Now, it's sure, libmysqlclient need to be fixed and qt rebuiled:

#include <QApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QDebug>

 int main( int argc, char *argv[] )
{
        QApplication app( argc, argv );

        QSqlDatabase defaultDB = QSqlDatabase::addDatabase   ( "QMYSQL3" );

            defaultDB.setDatabaseName( "akonadi");
            defaultDB.setUserName( "******" );
            defaultDB.setPassword( "*******" );
            defaultDB.setHostName( "localhost" );

            if ( defaultDB.open() ) {
                // Database successfully opened; we can now issue
                qDebug () << "ok";
            }
            else {
                qDebug() << defaultDB.lastError().databaseText().toLatin1();
            }


        return 0;
}

result:
"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

Last edited by gnumdk (2009-11-19 01:22:39)

Offline

#25 2009-11-19 01:21:38

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

gnumdk wrote:

Ok, found a bug:
gnumdk@archlinux:~$ pacman -Q libmysqlclient
libmysqlclient 5.1.41-1
gnumdk@archlinux:~$ mysql_config --socket
/tmp/mysql.sock

There is a bug with libmysqlclient package...

You are right man, I am looking into this.

gnumdk wrote:

So, as amarok and akonadi use Qt Mysql Engine, i think we need a fix for libmysqlclient and a new Qt build

qt is built without mysql, so why it should be rebuilt with the new mysql? also for Amarok.
fix libmysqlclient will fix all this.

Offline

Board footer

Powered by FluxBB