Skip to content

Commit

Permalink
Fix SQL user creation
Browse files Browse the repository at this point in the history
As reported by @colisee on LibreBooking#138 there's an issue when the database and web server are on 2 different ip addresses.  As sugested, a wildcard has been added, to allow for web server ip address changes. All credits go to @colisee
  • Loading branch information
effgarces committed Sep 23, 2022
1 parent 31208c2 commit 144c207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions database_schema/create-user.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DROP USER IF EXISTS 'lb_user'@'localhost';
CREATE USER 'lb_user'@'localhost' identified by 'password';
DROP USER IF EXISTS 'lb_user'@'%';
CREATE USER 'lb_user'@'%' identified by 'password';

DROP USER IF EXISTS 'lb_user'@'127.0.0.1';
CREATE USER 'lb_user'@'127.0.0.1' identified by 'password';

GRANT ALL on librebooking.* to 'lb_user'@'localhost';
GRANT ALL on librebooking.* to 'lb_user'@'%';
GRANT ALL on librebooking.* to 'lb_user'@'127.0.0.1';

0 comments on commit 144c207

Please sign in to comment.