Installer does not create user and database

Started by saksham.adyso, August 06, 2024, 01:37:29 PM

Previous topic - Next topic

saksham.adyso

I have checked on two installations: the installer cannot create a user and then a database when the Create database and database user before initialization checkbox is checked.
OS: Windows
DB: MariaDB

Error message:
NetXMS Database Manager Version 5.0.6 Build 5.0-1004-g5f3239af51 (UNICODE)

Creating database and user...
SQL query failed (You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.service IDENTIFIED BY '*******'' at line 1):
CREATE USER nx.service IDENTIFIED BY '******'
Unable to create database or user

***** PRESS ANY KEY TO CONTINUE *****

Filipp Sudanov

Make sure you've selected Legacy Authentication Method when installing MySQL as described in MySQL notes in this chapter: 
https://netxms.org/documentation/adminguide/installation.html#id14

On Initialize Database page in the installer "Create database and database user before initialization" should be checked, DBA login name should be "root" and DBA password is the password you entered when installing MySQL.

Event if this step fails, NetXMS software is fully installed, so you can connect to your MySQL DB with any client and issue queries to create user and database:
CREATE DATABASE netxms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'netxms'@'localhost' IDENTIFIED BY 'PaSsWd';
GRANT ALL on netxms.* to 'netxms'@'localhost';

You may also need to adjust NetXMS configuration file to match these credentials, the file is here: C:\NetXMS\etc\netxmsd.conf 

saksham.adyso

If I manually create a database and a user, everything works, but automatic does not. This is an installer error. I tried automatic user and database creation with MS SQL Server as well and the error was repeated.