Vistas:

Disclaimer:
The installation of MySQL databases is not part of DocuWare support.
As MySQL is a third party application we have no way of troubleshooting any issues, recommend any additional settings or check if the installation is fully complete.
DocuWare is not responsible for any corrupted systems, if the database is damaged during or after the installation.


Question:
How to install an external MySQL database and show the service in the service control?

Answer:
First check which version of MySQL you are currently using with the following command for a MySQL database:
SHOW VARIABLES LIKE "%version%";
Here a version will be stated.

5.0.84 is equal to a V1 internal database.
5.6.25 is equal to a V2 internal database.

For V1 installation downloads:
MySQL 32Bit
MySQL 64Bit

For V2 installation download:
Community installer

This guide will cover the installations of:

 

V1 internal Database
After downloading and running setup you will get the following screen after the splash screen.

Choose "Custom" if you want to install additional features or "Typical" if no additional features need to be installed.










After choosing the database type you can adjust the storage location of the database files.
If possible please do not alter the path.




Here you can set the wanted port and can choose to create an exception for the firewall automatically.


Please choose "Manuel selection" and use "utf8" from the drop down.


Install MySQL as a Windows Service.
If you want to show the database as Internal Database in the Service Control, please rename the service to "DWMySQL".

After this step you are prompted to set a password for the root-account.
Please choose a strong password and remember it!

Finish the configuration with "Execute"

After installting the database find the my.ini in "C:\ProgramData\MySQL\MySQL Server 5.6\" and find the my.ini from your old system in "C:\Program Files (x86)\DocuWare\Internal Database V2".
The new installation path can differ depending on the used version.

Download sample V1 my.ini
(Downloading ini-files may result in a warning).

Search for the following position in both my.ini
# The default character set that will be used when a new schema or table is
# created and no character set is defined
For the new my.ini:
Replace the "character-set-server" entry with all entries from the old my.ini
eg:
From
character-set-server=utf8
to
character-set-server=utf8
collation-server=utf8_unicode_ci

Check all other options in the my.ini and adjust all settings except "datadir".
For easier access you can use the Notepad++ Compare function to open both my.ini and see all differences.

You will have to create a new user with the needed rights before you can import the backups and start the migration process.

The following are example SQL-statements to create a user "dwadmin" with the password "password".
He has all privileges on any schema.
All three statements have to be executed.

CREATE USER 'dwadmin@localhost'    IDENTIFIED BY 'password';    
GRANT ALL PRIVILEGES ON *.* TO 'dwadmin'@'localhost';

FLUSH PRIVILEGES;

Check if the created user has DBA rights on the database.
After this follow the Migration article.

-------

V2 Internal Database
After downloading and running the setup you will see one of the following screens:

If nothing from MySQL in installed on the machine you will see this:

If there is already something installed from MySQL on this machine:


Both setups will finish and you need to configure the installation. From here on both versions have the same UI again.

Advance the setup until you reach the “Type and networking” section.

Here you can set the port, config type of the machine and the like.
Please select Server machine, if you want to install DocuWare on the same machine.

Now you will have to set a password for the root user. Pick a strong password and remember it!

Please also create a new user, which you want to use for DocuWare.
Granting the role “DB Admin” is one of the best methods to grant all rights needed for DocuWare.
Rights can be edited afterwards.

Advance until you can choose the behaviour for the windows service.

The right “Configure MySQL-Server as a Windows Service” must be granted.
If you want to see the database via Service Control rename the Service to “DWMySQL2

After installing the database find the my.ini in "C:\ProgramData\MySQL\MySQL Server 5.6\" and find the my.ini from your old system in "C:\Program Files (x86)\DocuWare\Internal Database V2".
The new installation path can differ depending on the used version.

Download sample V2 my.ini
(Downloading ini-files may result in a warning).

Search for the following position in both my.ini
# The default character set that will be used when a new schema or table is
# created and no character set is defined
For the new my.ini:
Replace the "character-set-server" entry with all entries from the old my.ini
eg:
From
character-set-server=utf8
to
character-set-server=utf8
collation-server=utf8_unicode_ci

Check all other options in the my.ini and adjust all settings except "datadir".
For easier access you can use the Notepad++ Compare function to open both my.ini and see all differences.

Check that you have a user with all needed rights (DBA, if possible super).
You should have created a DB-user during the setup in Step "Create a User".

Check the user and its privileges or grant all privileges to him.

After this follow the Migration article.