

Using best practices, we will create a database user that has access to only the traccar database. Provide the Traccar DB admin user full access to the Traccar database mysql -e "CREATE USER IDENTIFIED WITH mysql_native_password BY '$'" Mysql -e "FLUSH PRIVILEGES" #Force changes to come into effect Create the Traccar database & userĬreate the database that Traccar will use mysql -e "create database $dbTraccarName CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" #Creates the databaseĬreate the Traccar database user. Mysql -e "DELETE FROM er WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" #Deny root remote login. Mysql -e "DROP DATABASE IF EXISTS test" #Remove the demo database mysql -e "DROP USER IF #Drop anonymous users users #Drop anonymous users users export dbTraccarAdmin="traccar_admin"Įxport dbTraccarAdminPassword="$(openssl rand -base64 12)" Don’t stop halfway through these steps, and come back as the variable will cease to exist. Note: The password saved in the variable $dbTraccarAdminPassword below will exist whilst your terminal session is active.īe sure to complete all steps below. This way the password is never exposed to the command line history. In line two of the below code we have used openssl to generate a secure password and store it within the variable $securePassword. Prepare the database connection & credentials using export to set variables which we will reuse a few times. Save it in your password manager ALTER USER IDENTIFIED BY 'MyN3wP4ssw0rd' #Set the root passwordįlush privileges #force changes to come into effect Set yourself a strong MySQL Root password. Start the MySQL service systemctl start rvice
#TRACCAR DATABASE INSTALL#
Install MySQL Database Server apt install mysql-server -y
#TRACCAR DATABASE UPDATE#
Update all packages apt update Configure MySQL Once logged in, elevate to the root account sudo su We recommend that you look into ‘hardening’ your server, to prevent unauthorized users access. SSH into your server to begin configuring it. The GPS Tracking server has a portal that you can log into to see the data displayed on the interactive map. GPS Device > Receives Signal from GPS Satellite & stores location data > Sends location data over LTE/4G/5G/Satellite to GPS Tracking Server > User logs into Tracking Server web interface > Views GPS device on the map.

Other gps tracking devices may have slightly more complex systems to configure the tracking server but that won’t be covered in this guide.
#TRACCAR DATABASE HOW TO#
In the next tutorial, using the Traccar Client app, you will be shown how to point an Android & iPhone to the server as a demonstration of how it works. This guide will show you how to set up the Traccar Manager server, which receives the GPS location updates from the devices (iPhone, android, dedicated, etc) and displays them on an interactive map. There’s a limit of one device on this server. I use Racknerds Virtual Private Servers to host my Ubuntu Traccar demo server.Ĭlick the link below to check the end result of this guide.įeel free to register an account on our demo server, log in and check it out. Use this guide to install Traccar onto a Ubuntu 20.04 server. You can track vehicles, boats, trucks, kids, adults, pets via iPhones, Android devices, dedicated hardware and more. Traccar is an open source GPS Tracking platform which can locate any number and type of devices.
