Restoring a dump file no longer works, change in command?

Hi, it’s weird because it always worked for me and now I keep getting an error:

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysqldump: [Warning] Using a password on the command line interface can be insec’ at line 1

and I am copy and pasting the command that is in the docs:

$ docker exec -i some-mysql sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD"' < /some/path/on/your/host/all-databases.sql

I then edit it to:

$ docker exec -i sql-db sh -c 'exec mysql -uroot -p"super_secret_pw" users' < ./source.sql

also: after $ docker ps I get:

8fa9cb82332e        mysql:5.7           "docker-entrypoint.s…"   20 minutes ago      Up 20 minutes       0.0.0.0:3306->3306/tcp, 33060/tcp   sql-db

and I get the above error. thanks for any help

the problem was that at the top of the dump file it was written: mysqldump: [Warning] Using a password on the command line interface can be insec

1 Like