an addition to readme

This commit is contained in:
Bernd 2025-01-25 23:43:20 +05:00
parent 34e598ac1f
commit d736b9d7d4

View File

@ -10,3 +10,13 @@ mysql -u other_user -p some_empty_database < sql/schema.sql
``` ```
- Rename `config.example.php` to `config.php` - Rename `config.example.php` to `config.php`
- Specify the DB connection details in the config.php file - Specify the DB connection details in the config.php file
## How to create an admin account
Let's assume that your desired password is "adminpass123" and login is "admin". First, we should generate a hash for your password:
`php -r "echo password_hash('adminpass123', PASSWORD_BCRYPT) . PHP_EOL;"`
Copy the hash and put it to the `users` table in DB:
`mysql -u other_user -p some_empty_database`
```
INSERT INTO users (username, password_hash)
VALUES ('admin', 'hash_value');
```