niota

fascinating. logical.

User Tools

Site Tools


niota-docs:niota_install_meta

This is an old revision of the document!


Introduction

To run niota, you need a MySQL DBMS to which you add the niota metadata database (N-MDDB). It depends on the requirements of your IT department which way you have to choose to set up N-MDDB. The possible options are.

  • “A” install a dedicated niota MySQL Server with a pre-installed N-MDDB
  • “B” install a dedicated MySQL Server and add the N-MDDB
  • “C” add a pre-configured N-MDDB to an existing MySQL Server
  • “D” create new N-MDDB from MySQL scripts (the hard way)

Please check system requirements for valid combinations of niota application an MySQL server.


''A'' install MySQL DBMS with predefined N-MDDB

Download the MySQL Server from the niota download page. The download contains a portable MySQL server with a pre-installed empty N-MDDB. You can use this to set up niota very quickly. Please check the version of the meta database included in this download It has to fit the required version of you niota web application. Continue with Windows - set up MySQL.

''B'' install MySQL DBMS

Download the MySQL version from the official download page and copy the unzipped folder to target location on your server. Check System Requirements niota for highest supported MySQL version.

Continue with Windows - set up MySQL.
Then continue with option C or D

''C'' add/restore N-MDDB to a MySQL DBMS

If as MySQL Server is already up and running you can add a metadata database to this server. Download the accessory tools or a provided empty metadata database backup from the download page. Follow the steps listed here to add a metadata database to you MySQL DBMS.

''D'' set up N-MDDB on a MySQL DBMS

Download the accessory tools for niota and run all the scripts to set up database step by step. In this accessory folder you can find a /bin folder where all the executables are stored. This is just in case you are not allowed to run a standalone MySQL server for niota or you want to set up database on our own.

use embedded MySQL server and install niota metadata database (N-MDDB) as a service

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 port or stop the other MySQL server.

Execute listed tasks step by step in the given order

  • unzip downloaded NMDDB zip-file
  • move extracted folder to target location
  • rename the folder to your needs

Recommendation:


Remove the detailed version info.

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


Windows - setup MySQL

  • navigate to the mysql-<version> - folder and check the configured port in configuration file my.ini

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.

  • set your data directory.

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.

  • open windows command prompt in admin mode
  • navigate to your mysql-folder into the \bin\ - subfolder
  • initialize your data directory by mysqld –console –initialize
  • run command: mysqld –install <servicename>
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
  • change your password to a secure password
  • remove all anonymous users
  • remove all test databases and access to it

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.

Windows - 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

  • MySQL_niota_402 — niota php-application 4.0.x
  • MySQL_niota_411 — niota php-application 4.1.x
  • MySQL_niota_610 — niota php-application 6.1.x

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.

  • Set description of service with sc (service control manager) command
  • run command: sc description <servicename> “description”
...\bin>sc description MySQL_niota_610 "niota 6.1.x metadata"
  • go to windows services and start the service
  • verify that newly installed service switches to “Running” status and keeps running
...\bin>sc start MySQL_niota_v610

remove MySQL service

  • stop MySQL service
  • run command prompt in admin mode
  • run command:
sc delete ServiceName

or

  • navigate to “/bin” folder of that MySQL folder which service you would like to remove (e.g.: “Apache24x64\htdocs\niota\db\mysql-5.7\bin\”)
  • run command:
mysqld –-remove MySQL_niota
niota-docs/niota_install_meta.1747318915.txt.gz · Last modified: 2025/07/17 14:11 (external edit)