xelabs / go-mydumper

A multi-threaded MySQL backup and restore tool, faster than mysqldump

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

myloader don't run and don't show error

silasrm opened this issue · comments

Hi,

I'm trying to using myloader locally, and I use the password of root user as empty. Running this:

~/tmp/go-mydumper/bin/myloader -h localhost -P 3306 -u root -d dumper2

Return this, without any message to explain don't execute the restoring:

Usage: /home/silasrm/tmp/go-mydumper/bin/myloader -h [HOST] -P [PORT] -u [USER] -p [PASSWORD] -d [DIR] [-o]
-P int
TCP/IP port to connect to (default 3306)
-d string
Directory of the dump to import
-h string
The host to connect to
-o Drop tables if they already exist
-p string
User password
-t int
Number of threads to use (default 16)
-u string
Username with privileges to run the loader

Any idea I'm wrong?

dumper2 is a folder with go-mydumper/mydumper files.

commented

Hello,

The password can't be empty, you should create a new user with password and try again.

commented

Or,

Re-pull the source from https://github.com/xelabs/go-mydumper
The empty password issue has been fixed on the commit:
4f4b271

Hi,

I see the code and edit. Removing this passoword empty check and add this sql to disabled foreign constraint check:

err = conn.Execute("SET FOREIGN_KEY_CHECKS=0")
    AssertNil(err)

Add after call of use database;