Description of problem: To use a specific place for the defaults -file my.cnf (say ~/<path-to-my-dir>) in combination with mysql embedded server one has two options (see also [1]): 1. Put the path into the sever_options variable and issue mysql_library_init(num_elements, server_options, server_groups) 2. Set the environment variable MYSQL_HOME before calling [2] mysql_library_init(0, NULL, NULL) The first option works as expected, the second doesn't. Amarok uses the second option, but it refuses to start because the server is using the global my.cnf in /etc. A workaround for this is to put the amarok specific parameters in ~/.my.cnf. Why is the not working of the second option a bug IMHO? In the second option the initialisation of the server is done without any options. If you need some specialities you have to set them before the call to init. Setting MYSQL_HOME seems to be a good choice for this. There is however one sentence that's not clear to me and if it is relevant: "If you link this client against the normal mysqlclient library, this function [mysql_library_init()] is just a stub that does nothing." [1] http://dev.mysql.com/doc/refman/5.5/en/libmysqld-example.html [2] http://dev.mysql.com/doc/refman/5.5/en/option-files.html Version-Release number of selected component (if applicable): mysql-5.5.8-4.fc15.x86_64 How reproducible: run amarok (tested version 2.3.90-x and 2.4.0-1) under KDE 4.6 RC2. Look in ~/.xsession-errors. There you'll see the following message. mysql_embedded: Table 'mysql.plugin' doesn't exist InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins InnoDB: Compressed tables use zlib 1.2.5 110113 9:35:15 InnoDB: Using Linux native AIO 110113 9:35:15 InnoDB: Initializing buffer pool, size = 128.0M 110113 9:35:15 InnoDB: Completed initialization of buffer pool 110113 9:35:15 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name /var/lib/mysql/ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation. unnamed app(2226): Communication problem with "amarok" , it probably crashed. Error message was: "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.amarok was not provided by any .service files" " Actual results: mysql embedded server doesn't honour MYSQL_HOME Expected results: mysql embedded server honours MYSQL_HOME Additional info:
Hi, One more thing. The second option worked in the MySQL 5.1 series. Martin Kho
Seems to be a dup of http://bugs.mysql.com/bug.php?id=59280
ok, give .5 a try
Hi Tom, You've done a great job! Amarok is working again as it used to be. Please close this report. Thanks, Martin Kho
Hi, I just saw you already closed this report :-) Martin Kho