I’m not sure I understand your setup.
Are you planning on running WordPress on the CentOS box? If so, then using localhost as your DB_HOST is the right way to do it.
If you’re planning on running WordPress on your Win7 box, but with the database hosted on the CentOS box, then the IP Address is how you would do it. Likely the issue in this case is that there’s some sort of firewall mechanism that’s stopping outside connections to your database.
Maybe something like this will work: https://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos