Problems with PHP code and google MAP API

"I am using my computer as a mySQL server. Further, I have created a free account at 0fees .us(as a test hosting), which provides free hosting with a windows panel.It has support for PHP, FTP and it’s own mySQL server(multiple other server tools are available too).

I am trying to create a login page for militarybases (a client) using a ‘login page’, using PHP script, so that users can register and access the website. Rather than using mySQL (default of 0fees. us), I want to use my home PC mySQL server as a database server.

I have taken several steps to do so:

1- Using mySQL Server Instance Configuration Wizard (MSICW).
I am using TCP/IP with port# 3306. For the firewall, I have explicitly added the exception for that port and made the root access possible for remote machines.

2- In mySQL command line. I have granted the access by using:-

[b]GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';[/b]

3 - The port is forward to the router( Multiple tools are used to check it)

4- I made a page ‘login.php’, which is the login page to site forum, which script is saved in .htdocs directory.

Now the issue/problem:
It is trying but failing to connect to the local server. Here is the part of PHP, that is related to the issue here:

mysql_connect("$local_host", "$user_name_guest", "$pass_local")or die(mysql_error());
mysql_select_db("$name_of_db")or die("Connection Failed");

When attempting to connect to mySQL server, following is showing:

Can't connect to MySQL server on 'my_external_ip' (4)

Note: I don’t see any issue while connecting this server to remote machines on any networks (it is tested using NaviCat, you have to provide your ip and port no. to know the connection status).

Another issue that I am unable to solve is, I am using two maps on a particular directory page. The first map is showing on all the pages of the website(at the top). But the directory has two maps, at the top and before comments. The second map is showing errors & rather than displaying the required solution it is showing some random strings and binaries, with a static display of Google map. is also having the same issue. I have removed the second map to show the correct working of the page. Also, please have a look at the code/javascript/html of the page. And let me know, what changes are necessary for the case.

Every idea is welcome, and even it is a partial solution.

Thanks for your time.