Skip to content
Snippets Groups Projects
Verified Commit 5ae28a52 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Added documentation and FIXME for required DB permissions.

For #28
parent 26292eb6
No related branches found
No related tags found
1 merge request!17Release 6.0
Pipeline #26386 canceled
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
* Run `make install`. If a there is a database with the name you have choosen * Run `make install`. If a there is a database with the name you have choosen
during the configuration, you need to reconfigure or delete the database during the configuration, you need to reconfigure or delete the database
first. first.
* *Required database privileges:*
* If the user does not exist yet, you need the [appropriate global privileges](https://mariadb.com/kb/en/grant/#global-privileges), for example
`CREATE USER` and the privileges to grant that user all global privileges. The required
privileges may be reduced in the future.
* For normal usage, [database privileges](https://mariadb.com/kb/en/grant/#database-privileges) are required.
## Upgrade the SQL database ## Upgrade the SQL database
......
...@@ -174,6 +174,9 @@ function grant() { ...@@ -174,6 +174,9 @@ function grant() {
for host in ${DATABASE_USER_HOST_LIST//,/ } ; do for host in ${DATABASE_USER_HOST_LIST//,/ } ; do
echo "Granting admin privileges to '$DATABASE_USER'@'$host'" echo "Granting admin privileges to '$DATABASE_USER'@'$host'"
# FIXME Are all these permissions necessary? See
# https://gitlab.indiscale.com/caosdb/src/caosdb-mysqlbackend/-/issues/28 "Default
# installation target does not work for existing databases"
$MYSQL_CMD $(get_mysql_args_nodb) <<EOF $MYSQL_CMD $(get_mysql_args_nodb) <<EOF
CREATE USER IF NOT EXISTS CREATE USER IF NOT EXISTS
'$DATABASE_USER'@'$host' identified by '$DATABASE_USER_PW'; '$DATABASE_USER'@'$host' identified by '$DATABASE_USER_PW';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment