an addition to readme
This commit is contained in:
parent
fda6dd827f
commit
5044273811
@ -13,9 +13,13 @@ mysql -u other_user -p some_empty_database < sql/schema.sql
|
|||||||
|
|
||||||
## How to create an admin account
|
## 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:
|
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;"```
|
```
|
||||||
|
php -r "echo password_hash('adminpass123', PASSWORD_BCRYPT) . PHP_EOL;"
|
||||||
|
```
|
||||||
Copy the hash and put it to the `users` table in DB:
|
Copy the hash and put it to the `users` table in DB:
|
||||||
```mysql -u other_user -p some_empty_database```
|
```
|
||||||
|
mysql -u other_user -p some_empty_database
|
||||||
|
```
|
||||||
```sql
|
```sql
|
||||||
INSERT INTO users (username, password_hash)
|
INSERT INTO users (username, password_hash)
|
||||||
VALUES ('admin', 'hash_value');
|
VALUES ('admin', 'hash_value');
|
||||||
|
Loading…
Reference in New Issue
Block a user