Fix for MySQL embedded permissions error on upgrading to MySQL 5.5
Nikhil Marathe
nsm.nikhil at gmail.com
Sun Mar 20 18:45:17 CET 2011
Hi,
If any user/developer updates to MySQL 5.5 (for example Archlinux now
has 5.5.9), there is a bug in the MySQL build
which stops MYSQL_HOME from being treated as the directory to search
for my.cnf. This leads to permissions errors
and a crash.
BUG report: http://bugs.mysql.com/bug.php?id=59280
The fix is to set the environment variable
DEFAULT_HOME_ENV=$KDEHOME/share/apps/amarok
$ export DEFAULT_HOME_ENV=$KDEHOME/share/apps/amarok
To developers:
This patch should fix it. In fact should we commit this to master so
that we take care of any installations in the 5.5 range
from the next release onwards?
diff --git a/src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
b/src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
index 258675a..f8b64b8 100644
--- a/src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
+++ b/src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
@@ -82,6 +82,7 @@ MySqlEmbeddedStorage::MySqlEmbeddedStorage( const
QString &storageLocation )
}
setenv( "MYSQL_HOME", storagePath.toAscii().data(), 1 );
+ setenv( "DEFAULT_HOME_ENV", storagePath.toAscii().data(), 1 );
char *args[] = { "amarok" };
if( mysql_library_init( 1 , args, 0 ) != 0 )
{
I hope this saves somebody else a few hours.
Best,
Nikhil
More information about the Amarok-devel
mailing list