Table of Contents

Windows - setup MySQL

Setup requires that you have already downloaded the pre-configure or the official MySQL DBMS. If MySQL server is already running and listening on the same port as you want to run niota then you have to change your niota MySQL port or stop the other MySQL server.

Execute tasks listed down below step by step in the given order

Recommendation:


Remove the detailed version info.

e.g. rename “niota-meta-80_v2.1.21308” to “niota-meta_v2”


Default port 3306 is configured. If you have to change this, then set your desired port number here. If you change the port for N-MDDB you must edit also your connections.php file in N-PAPP and set this port number here as well.

If there is no my.ini at all, you can create one with a simple text editor.

In case nothing is set, data directory will be placed directly under the <MySQL-root folder>/data. If you want to change this, add the datadir=<path> setting to you my.ini file.

my.ini_sample
   [mysqld]
   datadir="C:/MySQLFarm/niota-meta-v3/data/"
   log_bin_trust_function_creators=1
   port=3367
   character-set-server = utf8mb4
			
   log_bin_trust_function_creators = 1
		
   [client]
   port=3367
...\bin> mysqld --initialize --console

After this you my find a lot of files in our data folder and a generated password for your local root user.

something like this.....

2025-05-04T13:03:37.806731Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-05-04T13:03:38.163275Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-05-04T13:03:40.008905Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: T5:und.yAQXe

This root password is a one time password and is not valid to sign in. It can only be used to set the password to a new password. Use command “mysql_secure_installation” to set the password. Tool “mysql_secure_installation” uses [client] parameter - section from my.ini configuration file

Take care to run mysql server either as service or in console mode when you start mysql_secure_installation. This tool needs an up and running MySQL Server

...\bin\mysql_secure_installation

Now you should be able to sign in to then new MySQL DBMS via a client tool. To check this out start the mysqld in console mode and try to connect via a client tool like MySQL workbench or MariaDB or similar.

Recommendation: Start N-MDDB in a console mode before you install it as a service. To achieve this run

mysqld --console

press CTRL+C to quit MySQL console mode

If you could successfully log in to the MySQL server with root user and your newly set password the configuration is ready to be installed as a service.

install MySQL as service

...\bin> mysqld --install MySQL_niota_610

Recommendation: Add the primary N-PAPP version number or/and the primary N-MDDB version to the service name. So possible servicenames would be

In case install as a service is denied, it is most likely that you have not started command window in administration mode!!!

Install/Remove of the Service Denied!

This naming conventions can be useful if you want to upgrade N-PAPP to a higher release and run the active release and the next release in parallel.

...\bin>sc description MySQL_niota_610 "niota 6.1.x metadata"
...\bin>sc start MySQL_niota_v610