A set of tools used with the Torque app for Android to store OBD2 data in MySQL, view GPS data from Torque on a map in real time using the Google Maps JavaScript API, plot OBD2 data in time series charts, and export the data to CSV or JSON.
creds.php (After db_table should be added $db_port)
$db_table = 'raw_logs';
$db_port = '3307';
dp.php
Line 7 change
$con = mysqli_connect($db_host, $db_user, $db_pass,$db_name,$db_port) or die(mysqli_error($con));
to
$con = mysqli_connect($db_host, $db_user, $db_pass) or die(mysqli_error($con));
Line 33 change
$con = mysqli_connect($db_host, $db_user, $db_pass,) or die(mysqli_error($con));
to
$con = mysqli_connect($db_host, $db_user, $db_pass,$db_name,$db_port) or die(mysqli_error($con));
Two files needs to be modified:
creds.php (After db_table should be added $db_port)
$db_table = 'raw_logs'; $db_port = '3307';
dp.php Line 7 change $con = mysqli_connect($db_host, $db_user, $db_pass,$db_name,$db_port) or die(mysqli_error($con)); to $con = mysqli_connect($db_host, $db_user, $db_pass) or die(mysqli_error($con)); Line 33 change $con = mysqli_connect($db_host, $db_user, $db_pass,) or die(mysqli_error($con)); to $con = mysqli_connect($db_host, $db_user, $db_pass,$db_name,$db_port) or die(mysqli_error($con));