Skip to content

Commit

Permalink
docs: XAMPP documentation update and db configuration enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
arelsirin-tk committed Oct 9, 2020
1 parent 6c97a03 commit 518b705
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Expand Up @@ -11,6 +11,7 @@ DB_PORT=3306
DB_DATABASE=ushahidi
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_SOCKET=

CACHE_DRIVER=memcached
QUEUE_DRIVER=sync
Expand Down
1 change: 1 addition & 0 deletions config/database.php
Expand Up @@ -75,6 +75,7 @@
'prefix' => env('DB_PREFIX', ''),
'timezone' => env('DB_TIMEZONE', '+00:00'),
'strict' => env('DB_STRICT_MODE', true),
'socket' => env('DB_SOCKET', '')
],

'pgsql' => [
Expand Down
1 change: 1 addition & 0 deletions config/ohanzee-db.php
Expand Up @@ -27,6 +27,7 @@
'database' => getenv('DB_DATABASE'),
'username' => getenv('DB_USERNAME'),
'password' => getenv('DB_PASSWORD'),
'port' => getenv('DB_PORT'),
'persistent' => false,
],
'table_prefix' => '',
Expand Down
5 changes: 5 additions & 0 deletions docs/development-and-code/setup_alternatives/xampp.md
Expand Up @@ -148,6 +148,11 @@ On Windows File Explorer, the default is to hide the extension of the files \(th
* Change the `DB_USER` to `root`
* Change the `DB_PASSWORD` to be empty, so literally: `DB_PASSWORD=`
* Change the `DB_DATABASE` to `platform`

{% hint style="info" %}
Hint: If you are running MySQL in a non-default port (different to 3306, the default one), you may also want to change `DB_PORT` to the port you are using. Also, if you need to specify a certain socket for db connection, you can do it by adding `DB_SOCKET` with the corresponding socket path.
{% endhint %}

* Run `composer install`. Wait while composer installs all the dependencies
* Run `composer migrate` to run the database migrations.
* This will create all the necessary tables and a default `admin` user with password `administrator`
Expand Down
1 change: 1 addition & 0 deletions phinx.php
Expand Up @@ -22,6 +22,7 @@
'name' => getenv('DB_DATABASE'),
'user' => getenv('DB_USERNAME'),
'pass' => getenv('DB_PASSWORD'),
'unix_socket' => getenv('DB_SOCKET'),
'charset' => 'utf8',
],
]
Expand Down

0 comments on commit 518b705

Please sign in to comment.