Bug #54659 mysqld does not load my.cnf for user directory
Submitted: 21 Jun 2010 8:53 Modified: 23 Jun 2010 8:12
Reporter: Alexander Nozdrin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:M3 (Celosia), M4 (Dahlia) OS:Any
Assigned to: CPU Architecture:Any

[21 Jun 2010 8:53] Alexander Nozdrin
Description:
The server does not honor ~/.my.cnf file if there are /etc/mysql/my.cnf

How to repeat:
Have a configuration in /etc/mysql/my.cnf
Have another configuration in ~/.my.cnf

Start the server:
$ ./sql/mysqld 
100621 12:48:30 [Warning] One can only use the --user switch if running as root

100621 12:48:30 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100621 12:48:30 [Note] Plugin 'FEDERATED' is disabled.
100621 12:48:30 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
100621 12:48:31  InnoDB: highest supported file format is Barracuda.
100621 12:48:31 InnoDB 1.1.1 started; log sequence number 1595675
100621 12:48:31 [ERROR] ./sql/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
100621 12:48:31 [ERROR] Can't start server: can't create PID file: No such file or directory

Start the server explicilty with ~/.my.cnf:
./sql/mysqld --defaults-file=~/.my.cnf 
100621 12:53:17 [Note] Buffered information: Performance schema disabled (reason: start parameters).

100621 12:53:17 [Note] Plugin 'FEDERATED' is disabled.
100621 12:53:17 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
100621 12:53:17  InnoDB: highest supported file format is Barracuda.
100621 12:53:17 InnoDB 1.1.1 started; log sequence number 1595675
100621 12:53:18 [Note] Event Scheduler: Loaded 0 events
100621 12:53:18 [Note] ./sql/mysqld: ready for connections.
Version: '5.5.5-m3-debug'  socket: '/home/alik/MySQL/var/mysql-trunk-bugfixing/mysqld.socket'  port: 3307  Source distribution
[21 Jun 2010 9:44] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with today update of mysql-next-mr and mysql-trunk-bugfixing. Do you have .my.cnf in home directory you are running MySQL as? How do you compile MySQL?
[21 Jun 2010 10:24] Alexander Nozdrin
Yes, I have .my.cnf in /home/alik.
The binaries were built by BUILD/compile-pentium-debug-max script (no CMake).