You are not logged in.

#26 2009-11-19 01:28:05

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

Re: MySQL 5.1.40 - configuration file moved

Ok, you may be right wink

I look at qt source, there is reference to mysql_config --libs/--flags but nothing about --socket

But, if i modify mysql_config by hand, it would not fix my qt test program... So, if rebuilding Qt is not needed, there is something more to fix... (as mysql client depend on libmysqlclient and works)

Last edited by gnumdk (2009-11-19 01:48:41)

Offline

#27 2009-11-19 02:22:55

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,555
Website

Re: MySQL 5.1.40 - configuration file moved

bash wrote:

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

Not really ... I have an application (mod_python/mysql) and it does not work at all.
The fix does solve the problem for PHP though.

What do I have to do to get mysql-python going? Is there a config file I need to update or something?

R.

Offline

#28 2009-11-19 03:11:33

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,555
Website

Re: MySQL 5.1.40 - configuration file moved

I've also tried to create a symlink to /var/run/mysqld/mysqld.sock in /tmp but that does not work either.

R.

Offline

#29 2009-11-19 04:12:56

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

How about mythtv? Is it a qt bug, a myth bug, a packaging bug?


Website - Blog - arch-home
Arch User since March 2005

Offline

#30 2009-11-19 08:21:29

ilpianista
Fellow developer
From: Lecce, Italy
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

ok, with mysql 5.1.41-2 this works here; I think qt apps are fixed now. Let me know if akonadi, amarok and mythtv work or not.

mysql.pro

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += sql

# Input
SOURCES += mysql.cpp

mysql.cpp

#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( "dbname");
            defaultDB.setUserName( "user" );     
            defaultDB.setPassword( "pass" ); 
            defaultDB.setHostName( "localhost" );

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

Offline

#31 2009-11-19 08:42:21

ilpianista
Fellow developer
From: Lecce, Italy
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

ralvez wrote:

Not really ... I have an application (mod_python/mysql) and it does not work at all.
The fix does solve the problem for PHP though.

What do I have to do to get mysql-python going? Is there a config file I need to update or something?

wait for mysql 5.1.41-2:
server_version.py

#!/usr/bin/python                       
import MySQLdb

conn = MySQLdb.connect (host = "localhost",
                        user = "user",
                        passwd = "pass",
                        db = "database")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()

$ ./server_version.py                                       
server version: 5.1.41

Offline

#32 2009-11-19 09:17:40

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

Re: MySQL 5.1.40 - configuration file moved

Amarok ok, akonadi ok!!!

Thanks!

Offline

#33 2009-11-19 09:50:42

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

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

Thank you! Works.

Offline

#34 2009-11-19 12:05:08

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

mythtv 0.22 still does not work..

the error accessing the database when running mythtv-setup is

2009-11-19 08:57:19.987 DB Error (SimpleDBStorage::Save() query):
Query was:
SELECT * FROM settings WHERE value = ? AND hostname = ?;
Bindings were:
:WHEREHOSTNAME=emmet, :WHEREVALUE=JobAllowUserJob1
Driver error was [2/1210]:
QMYSQL3: Unable to execute statement
Database error was:
Incorrect arguments to mysqld_stmt_execute

from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.

ive ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock but the issue is still there sad

Offline

#35 2009-11-19 12:23:06

ilpianista
Fellow developer
From: Lecce, Italy
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

eldragon wrote:

mythtv 0.22 still does not work..
from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.

are you using mysql 5.1.41-2?

Offline

#36 2009-11-19 12:32:27

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

bash wrote:
eldragon wrote:

mythtv 0.22 still does not work..
from http://www.gossamer-threads.com/lists/m … its/408912 they claim its a packaging bug.

are you using mysql 5.1.41-2?

yes

extra/libmysqlclient 5.1.41-2 [installed] 
     MySQL client libraries
extra/mysql 5.1.41-2 [installed] 
     A fast SQL database server
extra/mysql-clients 5.1.41-2 [installed] 
     MySQL client tools

from some extra searaching, they claim the issue is with qt's mysql bindings, which is what mythtv uses.. thats as far as my puny intelect goes sad

EDIT

check http://www.gossamer-threads.com/lists/m … 83;#387205 post 7

Last edited by eldragon (2009-11-19 12:37:15)

Offline

#37 2009-11-19 12:39:17

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

Re: MySQL 5.1.40 - configuration file moved

Amarok ok with mysql 5.1.41-2! Thanks :)

Last edited by estevao (2009-11-19 12:39:55)

Offline

#38 2009-11-19 13:04:32

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

and checked the current PKGBUILD which already has the workaround applied: CFLAGS += -fno-strict-aliasing

so we are back to square 1. sad

gonna dump the entire database and start over again...

EDIT: not a database issue.

Last edited by eldragon (2009-11-19 13:33:07)

Offline

#39 2009-11-19 15:32:29

ilpianista
Fellow developer
From: Lecce, Italy
Registered: 2007-10-06
Posts: 568
Website

Re: MySQL 5.1.40 - configuration file moved

unfortunately we built mythtv with mysql 5.1-41-1; rebuilding mythtv now.

Offline

#40 2009-11-19 15:34:07

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

I can't get the mailing list to load but this is what was said in regards to the issue:

You need to get a version of MySQL that was compiled properly.

If you're building from source, you can either use proper optimization
(i.e. don't set -O in CFLAGS) or apply the changes Davin posted to the
MySQL bug tracker (as mentioned at
http://svn.mythtv.org/trac/ticket/6683#comment:6 ) or using
-fno-strict-aliasing (as he mentioned in the MySQL bug report).

If you're using packages, get your packager to fix it.  You might want
to direct your packager to Davin's comment at the link above.

Mike

Looking at the suggest ticket leads to http://bugs.mysql.com/bug.php?id=48284

This states

Suggested fix:
The fix is fairly trivial, two things should be changed:
1) change the declared type of the "pos" parameter in store_param_type from "char **" to
"uchar **"
2) remove the "char **" cast from line 2554 in cli_stmt_execute. (Not strictly necessary,
but GCC gives a warning if you don't).

For a workaround with current version, it's easy just to add "-fno-strict-aliasing" to
CFLAGS.


Website - Blog - arch-home
Arch User since March 2005

Offline

#41 2009-11-19 15:47:57

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

pyther wrote:

I can't get the mailing list to load but this is what was said in regards to the issue:

You need to get a version of MySQL that was compiled properly.

If you're building from source, you can either use proper optimization
(i.e. don't set -O in CFLAGS) or apply the changes Davin posted to the
MySQL bug tracker (as mentioned at
http://svn.mythtv.org/trac/ticket/6683#comment:6 ) or using
-fno-strict-aliasing (as he mentioned in the MySQL bug report).

If you're using packages, get your packager to fix it.  You might want
to direct your packager to Davin's comment at the link above.

Mike

Looking at the suggest ticket leads to http://bugs.mysql.com/bug.php?id=48284

This states

Suggested fix:
The fix is fairly trivial, two things should be changed:
1) change the declared type of the "pos" parameter in store_param_type from "char **" to
"uchar **"
2) remove the "char **" cast from line 2554 in cli_stmt_execute. (Not strictly necessary,
but GCC gives a warning if you don't).

For a workaround with current version, it's easy just to add "-fno-strict-aliasing" to
CFLAGS.

ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG

Offline

#42 2009-11-19 15:52:32

firecat53
Member
From: Sammamish, Wa
Registered: 2007-05-14
Posts: 1,448
Website

Re: MySQL 5.1.40 - configuration file moved

Using the latest 5.1.41-2 mysql and mysql-python 1.2.3c1-1, I still get the error:

.....
   conn = dbapi.connect(**params)
  File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 188, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")

I made it work by going in to my.conf and changing the sockets to /tmp/mysql.sock instead of /var/run/mysqld/mysqld.sock. I'm sure this would break something else (luckily I don't use mysql for anything else right now).

Is that still a mysql-python error? I thought you had fixed that already with the 1.2.3c1-1 release.

Thanks for your help on this!
Scott

Offline

#43 2009-11-19 16:02:41

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

eldragon wrote:

ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG

How did you find this out? I do not see this option being set in the x86_64 mysql pkgbuild.
http://repos.archlinux.org/wsvn/package … 4/PKGBUILD


Website - Blog - arch-home
Arch User since March 2005

Offline

#44 2009-11-19 16:29:55

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

pyther wrote:
eldragon wrote:

ive done some digging, and this is old, arch already packages with the -fno-strict-aliasing CFLAG

How did you find this out? I do not see this option being set in the x86_64 mysql pkgbuild.
http://repos.archlinux.org/wsvn/package … 4/PKGBUILD

scratch that.. i was looking at an old PKGBUILD! sad

anyway, it should have been fixed by now. if you want to, check the source files for the changes proposed wink

Offline

#45 2009-11-19 16:51:05

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

What source files are you talking about? The files in trunk appear to be the same as those in the repos.


Website - Blog - arch-home
Arch User since March 2005

Offline

#46 2009-11-19 18:24:39

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

pyther wrote:

What source files are you talking about? The files in trunk appear to be the same as those in the repos.

local abs tree, forgot to update it smile


anyway, mythtv 0.22-3 made it to the repos. yet the issue persists..... any more ideas anyone?


EDIT
Ive checked the sources, and no, it was not patched yet. did the patch manually and am  building mysql.

will report back with results

fix suggested here: http://bugs.mysql.com/bug.php?id=48284

Last edited by eldragon (2009-11-19 18:56:44)

Offline

#47 2009-11-19 19:01:46

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

Forgive me for being confused, but it seems like compiling mysql with the -fno-strict-aliasing cflag may fix the issue.

Have you tried this yet? I will give it a go, but I am sure it will take a long time on a Sempron +2200


Website - Blog - arch-home
Arch User since March 2005

Offline

#48 2009-11-19 19:04:30

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,026

Re: MySQL 5.1.40 - configuration file moved

pyther wrote:

Forgive me for being confused, but it seems like compiling mysql with the -fno-strict-aliasing cflag may fix the issue.

Have you tried this yet? I will give it a go, but I am sure it will take a long time on a Sempron +2200

call me stupid, but i dont actually know where to put the CFLAGS in the pkgbuild, so i just modified libmysql.c as explained in the bug report and im buildiung just that.

/me builds on an athlon 3000 wink

EDIT: finnished building. installed. and restarted both mysqld and mythbackend.

this time, mythbackend ran correctly. im not at home so i cannot test if it actually works. but everything looks like it does.

Last edited by eldragon (2009-11-19 19:29:07)

Offline

#49 2009-11-19 19:16:57

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

I just added export CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing" to the pkgbuild.
These are the default CFLAGS in makepkg with the added -fno-strict-aliasing.

export CFLAGS=$CFLAGS+"-fno-strict-aliasing" might be cleaner

Actually I just applied the said fix in the code. Here is the patch

--- libmysql/libmysql.c.old     2009-11-19 14:26:39.542270424 -0500
+++ libmysql/libmysql.c 2009-11-19 14:28:47.422256556 -0500
@@ -2285,7 +2285,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *st
 
 /* Store type of parameter in network buffer. */
 
-static void store_param_type(char **pos, MYSQL_BIND *param)
+static void store_param_type(uchar **pos, MYSQL_BIND *param)
 {
   uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0);
   int2store(*pos, typecode);

Last edited by pyther (2009-11-19 19:33:12)


Website - Blog - arch-home
Arch User since March 2005

Offline

#50 2009-11-19 20:52:05

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: MySQL 5.1.40 - configuration file moved

The patch above fixed the issue with mythtv.


Website - Blog - arch-home
Arch User since March 2005

Offline

Board footer

Powered by FluxBB