Sorry for the inconvenience to you all. I got my answer
This error came because I have passed empty string in connection_username and connection_password .
Remember that these field should not be left empty.
Also next I've come up with mysql error showing Select privileges not there for 'user'@'localhost'.
To remove this error run below commands:
>mysql -u root -p
>GRANT ALL PRIVILEGES ON *database_name* TO 'user'@'localhost' WITH GRANT OPTION;
Now it will run smoothly without any error.