]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
MySQL: Use correct syntax for creating the radius user
authorTerry Burton <tez@terryburton.co.uk>
Fri, 8 May 2020 12:38:53 +0000 (13:38 +0100)
committerAlan DeKok <aland@freeradius.org>
Fri, 8 May 2020 18:11:46 +0000 (14:11 -0400)
This syntax works from at least MySQL 5.7 to MySQL 8 and corresponding MariaDB
versions.

raddb/mods-config/sql/main/mysql/setup.sql

index f0453e179a6721c5675f6d72ad30a97e1ccb48fa..cd44117def3283fd94e0b956a52c67bebfde529a 100755 (executable)
@@ -11,8 +11,7 @@
 #
 #  Create default administrator for RADIUS
 #
-CREATE USER 'radius'@'localhost';
-SET PASSWORD FOR 'radius'@'localhost' = PASSWORD('radpass');
+CREATE USER 'radius'@'localhost' IDENTIFIED BY 'radpass';
 
 # The server can read any table in SQL
 GRANT SELECT ON radius.* TO 'radius'@'localhost';