Bug #58526 Unable to export database with MySQL workbench if ~/.my.cnf exists

Submitted: 26 Nov 2010 18:14 Modified: 16 Jan 2014 1:58
Reporter: Aleksey Ovcharenko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:5.2.30 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: export, my.cnf, workbench

[26 Nov 2010 18:14] Aleksey Ovcharenko
Description:
During export getting this in log:

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password:
YES) when trying to connect

Operation failed with exitcode 2

How to repeat:
Try to export with "Data Dump -> Export to Disk" if you have custom ~/.my.cnf

Suggested fix:
MySQL client limitation/bug? ~/.my.cnf has read in the end of all defaults files parsed, even if you define --defaults-extra-file in command line.

As workaround replace inside of Contents/PlugIns/wb_admin_export.py:
 
    91                 pwdfilename = os.path.join(tmpdir, 'extraparams')
     92                 os.mkfifo(pwdfilename)
     93    
     94             logstr += "--defaults-extra-file=\"" + pwdfilename + "\" "

with

     91                 pwdfilename = os.path.join(tmpdir, 'extraparams')
     92                 os.mkfifo(pwdfilename)
     93    
     94             logstr += "--defaults-file=\"" + pwdfilename + "\" "
[2 Jan 2011 15:48] Valeriy Kravchuk
Doesn't http://dev.mysql.com/doc/refman/5.1/en/option-files.html explain what happens? Why do think there is a bug here?
[3 Jan 2011 15:04] Aleksey Ovcharenko
IMHO, ~/.my.cnf shouldn't be used here as MySQL workbench creates temporary my.cnf file with password for tunneled connection. Obviously that temp my.cnf file will be overwritten by local ~/.my.cnf data, making connection impossible (unless you use same password for ALL your MySQL servers).
[22 Feb 2011 18:09] Juan Rene Ramirez Monarrez
Aleksey

The issue has been reproduced, even the application works as designed it seems to be an issue, I'm glad you've found a workaround, we will need to review this further to see the best option to get it resolved.

thanks.
[16 Jan 2014 1:58] Philip Olson
Fixed as of the upcoming Workbench 6.1.1 release, and here is the changelog entry:

On Linux, executing "Export to Disk" with a custom "~/my.cnf" present
would cause the export to fail.

Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.