Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqldiff does not compare (two) files as advertised #39

Open
Koopman opened this issue Nov 15, 2016 · 5 comments
Open

mysqldiff does not compare (two) files as advertised #39

Koopman opened this issue Nov 15, 2016 · 5 comments

Comments

@Koopman
Copy link

Koopman commented Nov 15, 2016

It appears that mysqldiff no longer / doesn't compare two mysqldump files as advertised in the POD. eg:

mysqldiff a.sql b.sql

where a.sql could be a.mysql and similar for b.

It produces this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
mysqldump failed. Exit status: 2:
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect

@Koopman
Copy link
Author

Koopman commented Nov 15, 2016

It turns out that it is a requirement that there is a mysql database available, so that mysqldiff can create temporary tables to allow it to do its business.

Please would you update the usage() and POD to make this clear(er). Specifically, that mysqldiff requires access to a working mysqld, if necessary by using the user/password etc arguments to access the database.

Maybe a more informative message if no database is available could help.

@Pierozi
Copy link

Pierozi commented Dec 14, 2016

Hello, in fact I think you are talking about mysql-utilities tools and not related to this project.

@AllanCochrane
Copy link

Agree with Koopman, mysqldiff does seem to require a real database to be available in order to compare two files.

@diegobill
Copy link

Hello, any update about receive a file (dump) as input? it is possible? if yes, how?

@diegobill
Copy link

I figured out how to pass a file (dump) as input for mysqldiff, you need to create an user (same user of the terminal that you are executing mysqldiff) on mysql without password, because the command will create a temporary table as described in man:

INTERNALS
·   If the argument is a valid filename, the file is used to create a temporary database which "mysqldump -d" is run on to obtain the table definitions in canonicalised form.  The temporary
           database is then dropped.  (The temporary database is named "test_mysqldiff_temp_something" because default MySQL permissions allow anyone to create databases beginning with the prefix
           "test_".)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants