# GKSPHONE Real App

Installation

{% hint style="info" %}
GKSPHONE REAL APP is only authorized to view your SQLs. They do not have the authority to change / effect / add / delete / drop
{% endhint %}

## Connecting your database information <a href="#connecting-your-database-information" id="connecting-your-database-information"></a>

{% tabs %}
{% tab title="HeidiSQL" %}

1. Log in to your database using HeidiSQL

2. Open `Tools` > `User Manager`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2Fu52MCdJ3tofqpUr8Dpvi%2Fimage.png?alt=media&#x26;token=a5b9015f-c118-46b8-932a-0d32c59d4474" alt=""><figcaption><p>HeidiSQL - Tools > User Manager</p></figcaption></figure>

3. `Click Add`

4. Enter user name, password and set `%` in the `From Host` field. This is to provide SQL access with GKSPhone Real App.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FFXuivdaOwQ4g5VClCXIP%2Fimage.png?alt=media&#x26;token=142bfb22-4247-4897-a410-ce9a1e502f5d" alt=""><figcaption><p>HeidiSQL - User Manager</p></figcaption></figure>

5. In the `Allow access to:` section, click `Add object`

6. Choose your server database then click `OK`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FJWO8SZwOozaZE0OyrHbY%2Fimage.png?alt=media&#x26;token=3adb263a-92b1-4f94-83b1-3ba7c8c17b4f" alt=""><figcaption><p>HeidiSQL - Select Database</p></figcaption></figure>

7. Select `EXECUTE`, `SELECT`, `SHOW VIEW` permissions and click the `Save` button.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FQrTObeixPXTj54kocTUP%2Fimage.png?alt=media&#x26;token=ddb7ed51-9363-4b3d-ab12-d4865c13b9eb" alt=""><figcaption><p>HeidiSQL - Database Permissions</p></figcaption></figure>
{% endtab %}

{% tab title="phpMyAdmin" %}

1. Open your **phpMyAdmin Web Panel**

2. Click on the `User accounts` section

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FuljQWVWLbRr7B6Uo0KhC%2Fimage.png?alt=media&#x26;token=fd758afe-a430-4042-95e1-8e4b1963a829" alt=""><figcaption><p>phpMyAdmin - Index</p></figcaption></figure>

3. Click `Add user account`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FZGamlrUxwxRS4QWvZjzZ%2Fimage.png?alt=media&#x26;token=4ca0f4fc-292f-4309-b9bb-701e15eba60a" alt=""><figcaption><p>phpMyAdmin - User Accounts</p></figcaption></figure>

4. Enter user name, password and `Host Name` section should be set to `Any Host` and its value should be `%` This is to provide SQL access with GKSPhone Real App

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FFYj5fReCK1mio6ZCmPMk%2Fimage.png?alt=media&#x26;token=b823fed4-7e3c-443b-aec5-068ce5357080" alt=""><figcaption><p>phpMyAdmin - New User Informatıon</p></figcaption></figure>

5. After creating the account, click `Edit privileges`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2Fa47yZ9Osg8t5ozVjuYpC%2Fimage.png?alt=media&#x26;token=e5979201-7cb3-4d44-9964-bedbf1b7ce8f" alt=""><figcaption><p>phpMyAdmin - Edit Account Privileges</p></figcaption></figure>

6. Choose your server database then click `GO`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2Fljanj8BkBHIJGilP01qV%2Fimage.png?alt=media&#x26;token=4ab4c4ad-7709-41ab-a03e-6d7d558802aa" alt=""><figcaption><p>phpMyAdmin - Select Database</p></figcaption></figure>

7. Select `SELECT`, `SHOW VIEW` permissions and click the `Go` button.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FBC4tLoGST4WnkgomY2Fp%2Fimage.png?alt=media&#x26;token=fc23d323-6c65-40f0-9700-1d8e3c3ad216" alt=""><figcaption><p>phpMyAdmin - Database read authority</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Connecting your SQL account information to the application <a href="#connecting-your-sql-account-information-to-the-application" id="connecting-your-sql-account-information-to-the-application"></a>

<br>

{% tabs %}
{% tab title="Add your server" %}

1. Go to [APP GKSHOP](https://app.gkshop.org/#/) site

2. Log in to your account. If you aren't registered, `register with the email address you purchased your Real App subscription from!`

3. Go to `Services` > `Real App`

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FfxOIXExmJsZR82xwCsc9%2Fimage.png?alt=media&#x26;token=9c2d4f24-404b-44fe-8c4f-a930c530b120" alt=""><figcaption><p>GKSHOP Application - Homepage</p></figcaption></figure>

4. Enter your create SQL account and server information in the table that appears on the screen.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FN5oSX3yrVVMmNJmDOjFL%2Fimage.png?alt=media&#x26;token=91762859-c161-4593-927a-29e2c96cc2ab" alt=""><figcaption><p>GKSHOP Application - Real App</p></figcaption></figure>

| Field       | Value                                                                                                                             |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Server ID   | Your [fivem server id](https://gkshop.org/gksphone/serverid.png)                                                                  |
| Host/Adress | Enter your server ip                                                                                                              |
| Port        | SQL Port, Default 3306                                                                                                            |
| Database    | Enter your database name                                                                                                          |
| Username    | [SQL account username you created](https://docs.gkshop.org/other-products/gksphone-real-app#connecting-your-database-information) |
| Password    | [SQL account password you created](https://docs.gkshop.org/other-products/gksphone-real-app#connecting-your-database-information) |

5. After filling in all fields, press the `TEST CONNECTION` button

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2Fx3jWIjTufGSLKU1aKcqQ%2Fimage.png?alt=media&#x26;token=f7a5b2a6-edd9-4927-9fe0-84ec901520c6" alt=""><figcaption><p>GKSHOP Application - Real App > Test Connection</p></figcaption></figure>

6. After the test connection is successful, click the `SAVE` button

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FVfSxIfeSoHYWjzgE3Roj%2Fimage.png?alt=media&#x26;token=6a522fc3-51bb-4a20-96e0-fc04c67a77f3" alt=""><figcaption><p>GKSHOP Application - Real App > Test Connection Succesful</p></figcaption></figure>

7. Now your added server will appear here

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FKbZ8Bp5DAjfx0O5iXjEc%2Fimage.png?alt=media&#x26;token=dd88fc71-1234-4a8d-a5d7-44af1b6f9e1b" alt=""><figcaption><p>GKSHOP Application - Real App > Server List</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Port Forwarding <a href="#port-forwarding" id="port-forwarding"></a>

The real app needs a MySQL port to access your information. If you receive the following error in the `Test Connection` step even though you entered all your information correctly, it means that your MySQL `3306` port is not open.<br>

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2F9pgUpHfzfiVoiUyrCQ7e%2Fimage.png?alt=media&#x26;token=feaad19f-63fd-4a8f-8534-14d0a0f8f16e" alt=""><figcaption><p>GKSHOP Application - Real App > Test Connection Error</p></figcaption></figure>

You can check whether this port is open by typing your machine IP address and port 3306 [on this site.](https://www.yougetsignal.com/tools/open-ports/)

{% hint style="danger" %}
After making sure your port is closed, you need to open the port. If you have no knowledge about opening a port, **"please contact your hosting provider."**
{% endhint %}

## Core and Vehicle Table Configuration <a href="#core-and-vehicle-table-configuration" id="core-and-vehicle-table-configuration"></a>

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FwsN6wJUXqiMneCYvShIH%2Fimage.png?alt=media&#x26;token=0a2e2335-5d05-4d07-b55f-57bf4e51496a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In this section you must write your core information and sql tool table name. This is mandatory for the application to work correctly and display the correct data!
{% endhint %}

{% hint style="danger" %}
**Don't forget to select your server from the Servers section then to click "UPDATE" after making your settings.**
{% endhint %}

## **Application Configuration**

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2Fsi9KFvt07WzYtNHpbsMq%2Fimage.avif?alt=media&#x26;token=662ec2f2-3089-400d-ba02-9e82da3bcde3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This section shows the applications found in real app. You can close the application that you don't want to use from these applications. Simply remove the tick next to the application name.
{% endhint %}

{% hint style="danger" %}
**Don't forget to select your server from the Servers section then to click "UPDATE" after making your settings.**
{% endhint %}

## **Configuration for Real App Functions**

After doing all the above steps, you need to change the `Config.RealApplication` setting in `gksphone/config/config.lua` to true.

<figure><img src="https://1859156681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4ljavSyu0jJXdm0X9Pd%2Fuploads%2FlDqlyT48PZct6si3sGDv%2Fimage.avif?alt=media&#x26;token=53f0c1ef-e4f6-42e5-80cd-218596a3f635" alt=""><figcaption></figcaption></figure>
