Based on @KaraPirinc's comment, in docker version 17 in order to log in (Step 1),
docker login -u username -p password
I also had the same issue.This is how I resolve it.
Step 1: log in to docker hub
docker login --username=<user username> --email=<user email address>
Step2: create a repository in the docker hub. let's say " mysqlserver:sql ".
docker push <user username>/mysqlserver:sql