I think if you look closer, you have commented out the correct connection to the database!
//mysql_connect(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD)
and created a new call to mysql_connect() which is invalid
$connection = mysql_connect("localhost", "mysql -u root", "" )
I assume this is also just an example, but if not you also need to add some code to test the result statuses of all these calls, specifically as the OUTFILE command will fail if `geolocDB.txt` already exists, from a previous OUTFILE attempt.
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-