如何使用数据库服务器访问localhost?

My connection database localhost in env file is like this :

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=chelsea
DB_USERNAME=root
DB_PASSWORD=terry

It's using database local

I want access localhost using database server

I change the connection in env file to be like this :

DB_CONNECTION=mysql
DB_HOST=31.220.56.75
DB_PORT=3306
DB_DATABASE=chelsea
DB_USERNAME=root
DB_PASSWORD=terry

Then, I access my localhost, there is exist error like this :

QueryException in Connection.php line 769: SQLSTATE[HY000] [1045] Access denied for user 'root'@'114.121.233.117' (using password: YES) (SQL: select * from `users` where `users`.`deleted_at` is null)

Is there any people who can help me?

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=yourdatabasename
DB_USERNAME=root
DB_PASSWORD=