you can use this command which will ask for a password and download your database into the current directory
mysqldump -u root -p database> dump.sql
if you are form windows use PowerShell administrator mode and if you are using Linux use Sudo command. Then run those query.
You can also follow below steps
Step -1 First download SQLyog https://sqlyog.jaleco.com/, then install it.
You will get something like
Now create a new connection for your localhost then connect to your remote database. You must remain connected to both servers together.
Step -2 Then right-click to your remote database you will get the following options.

step-3 Now click copy database to a different host then you will get another window like

step-4 Finally, select localhost and your database from the dropdown option. If you want structure and data check below option. Then click copy. The database will be copied. Due to my old version interface could be different but process will remain the same.