Hello to all purchasers of the "QMariaDB_10.4.12.0._*.qpkg" and newer,
after the installation of the QMariaDB you might run into several issue, there is no manual for this QPKG and you might wait for a long time to get e-mail support from QNAPclub.eu. The so called "Maker" doing all of this in their spare time. So be aware of this. Hopefully this short manual is a good first aid for those who start from scratch.
This is an
inofficial manual as I'm only a customer like you and I don't get paid for my work.
Use at your own risk.
Table of contents
1. Annotation
2. Download issues on QNAPclub.eu
3. Prerequisite
4. User login and default password
5. How to change the root's password
6. Secure MariaDB
7. Remote Access via SSH to your station
8. How to fix: "The secret passphrase in configuration (blowfish_secret) is too short."
9. How to fix: "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated."
10. "latin1_swedish_ci" and co vs. "utf8mb4_unicode_ci"
11. Restart MariaDB
12. Repair "Access Denied for User 'root'@'localhost' (using password : NO)"
13. Full uninstall QMariaDB
14. Glossary
1. Annotation
Please help to support the community by letting me know, if there is a mistake, how to explain in a better way and what is missing. Please don't hesitate and send a message.
2. Download issues on QNAPclub.eu
It doesn't matter if you try to download a QPKG directly from QNAPclub.eu, from the freeware repository or your unique store link. Sometimes, especially with large files, your download will fail because of network errors.
The fix is easy and costs you only patience. After your download has failed, try again and again. You will see, after several tries you will manage your download successfully.
3. Prerequisite
To work in a comfortable way, you must execute this step by step instruction.
- Login to your station.
- Open the app "File Station".
- Navigate to the network share "/Web/mariadb/".
- Right click on the folder "mariadb" and select "Properties" from the context menu.
- Switch to tab page "Permission".
- You can choose between 2 choices now.
- Add your personal user profile by clicking on the green plus button. It is the user, which you use to be able to access the station's network shares.
- If you know that your user profile is member of the local "administrators" group you must remove the default user profile "admin" by clicking on the red minus button, then click on the green plus button. In the dialog "Select users and groups" select "Local Groups" and check the entry "administrators" in the "RW" column. Click on the button "Add" now. Finally click on the button "Apply". Confirm the success dialog message by clicking on the "OK" button.
4. User login and default password
- The default user name is "root" and the password is "qnap". Please change the password for security reasons.
- To open phpMyAdmin open this address "https://<<station's_IP_address>>:8081/mariadb/index.php".
5. How to change the root's password
- After login to phpMyAdmin click in the center of the upper toolbar on the button "User accounts".
- In the "User accounts overview" table look for "root" in the column "User name". Click on "Edit privileges" in the "Action" column.
- Click on the upper button "Change password".
- Enter two times the identical password. For security reason a complex password is recommended.
- Click on the button "Go" on the lower far right to overtake your changes.
6. Secure MariaDB
- Here the step by step instructions on how to remove the unnecessary database.
Option A
- Login to phpMyAdmin.
- Click on the upper left toolbar button "Databases".
- In the table check the checkbox in the first column of database "test".
- Below the table click on the link "Drop".
- Click the button "OK" in the confirmation message.
- The database "test" is deleted.
Option B
- Login to phpMyAdmin.
- Click on "Console" on the far bottom.
- Enter the command:
- Now enter this command:
Code: Select all
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
- Remove anonymous users from "User accounts".
- Login to phpMyAdmin.
- Click on "Console" on the far bottom.
- Enter the command:
Code: Select all
DELETE FROM mysql.user WHERE User='';
- Check if there are users named "ANY" are left.
- If left, delete manually by navigating to "User accounts".
- Check the checkbox of the user to delete.
- Scroll down and click then on the button "Go".
- Remove all user accounts, which have empty passwords.
Reload the privileges tables to apply the changes. To do so enter the command "FLUSH PRIVILEGES;"
Restart the QMariaDB service.
7. Remote Access via SSH to your station
You must install, or simply use their portable versions, WinSCP or PuTTY. I recommend you both, because with PuTTY you can restart services on you station and with WinSCP it is much more comfortable to navigate through your station's folders and to edit files. Please be aware to first check in QNAP's "ControlPanel", category "Network & File Services" and sub-category "Telnet /SSH" the checkbox "Allow SSH connection" (used for WinSCP and PuTTY) and "Enable SFTP" (used for WinSCP).
8. How to fix: "The secret passphrase in configuration (blowfish_secret) is too short."
If you see this message, then follow these step by step instructions.
- Access your station's network share "/Web/mariadb".
- Open the "config.inc.php".
- Scroll to the line "$cfg['blowfish_secret'] = '54c4db576cf003.60815636';"
- Change the value "54c4db576cf003.60815636" to a random string with alphanumeric and special characters, which is at least 32 characters long.
- Save the change.
- Re-open the phpMyAdmin page by opening "https://<<station's_IP_address>>:8081/mariadb/index.php".
9. How to fix: "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated."
If you see this message, then follow these step by step instructions.
- After login to phpMyAdmin click inside the footer in that message on the link "Find out why".
- You'll see the line "Configuration of pmadb... not OK".
- In the footer below click inside the message "Create a database named 'phpmyadmin' and setup the phpMyAdmin configuration storage there." on the link "Create".
- After a few seconds the new database "phpmyadmin" is generated.
- You can navigate back to "Home" and the footer message has disappeared.
10. "latin1_swedish_ci" and co vs. "utf8mb4_unicode_ci"
There is a long development history behind MariaDB. If you create new databases it suggests you to use the default character set "latin1_swedish_ci". The development team behind MariaDB failed to implement proper support for UTF-8 for a long time. After several tries and years they come closer and closer to the UTF-8 standard. They finally did with the "utf8mb4_unicode_ci" character set. If your database need to handle characters which aren't latin and you want the best compatibility choose this.
What about "utf16_unicode_ci" and "utf32_unicode_ci"? First UTF-8 has advantages in cases where ASCII characters are used. Both UTF-8 and ASCII encode one character into 8 bits. The disadvantage of a database with UTF-16 or UTF-32 is clear, they both are space-inefficient. For Asian languages you might prefer one of them.
Comparison:
- UTF-8: Takes 1 to 4 bytes, depending on the characters used.
- UTF-16: Takes 2 to 4 bytes, depending on the characters used.
- UTF-32: Takes 4 bytes in spite of the characters used.
11. Restart MariaDB
Option A
- Start the "putty.exe".
- Select the category "Session" and enter your station's IP address into the input field "Host Name (or IP address)". Leave the port number "22" and select as "Connection type" the option "SSH".
- Click below on the button "Open".
- The PuTTY console window will open.
- Enter at first your administrator's user name "admin", then press the "Enter" key.
- Now enter the password of the user "admin", then press the "Enter" key again. You're logged in your station.
- Behind the "[~] #" enter "/etc/init.d/QMariaDB.sh restart" and press the "Enter" key, which will stop your QMariaDB in first place and then right after start it again.
- To leave the console enter "exit", then press the "Enter" key.
Option B
- Login your station and open the "App Center".
- In the category "QNAP Store" in the sub-category "My Apps" search for "QMariaDB 10.x".
- Click on the blue button with the down arrow and select "Stop".
- After a short waiting time this app is stopped and the blue button turns into black.
- To start the app again click on the black button "• Start" to start QMariaDB again.
12. Repair "Access Denied for User 'root'@'localhost' (using password : NO)"
In case you're running into big trouble like "mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' " on the phpMyAdmin login screen, because you revoked all active privileges from the user root and deleted him afterwards, then here is your fix.
- Open WinSCP or PuTTY and navigate to "/share/CE_CACHEDEV1_DATA/.qpkg/QMariaDB".
- Open the "my.cnf" text file.
- Scroll down to the row "[mysqld]".
- Add in one extra row beneath the following line "skip-grant-tables".
- Save the change.
- Restart QMariaDB.
13. Full uninstall QMariaDB
If an usual uninstall isn't enough, here are the steps to perform a full cleanup of your station.
- Login to your station.
- Open the "App Center".
- In the category "QNAP Store" in the sub-category "My Apps" search for "QMariaDB 10".
- Click on the blue button with the down arrow and select "Stop".
- After a short waiting time this app is stopped and the blue button turns into black.
- Click on the down arrow again and select "Remove".
- Open WinSCP or PuTTY and navigate to "/share/CE_CACHEDEV1_DATA/".
- Delete the folder "QMariaDB". (This folder contains your databases.)
- Navigate to "/tmp".
- Delete the file "QMariadDB2.sock".
14. Glossary
- P
- PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. Get it from the official website: https://www.chiark.greenend.org.uk/~sgtatham/putty/
- W
- WinSCP (Windows Secure Copy) is a free and open-source SFTP, FTP, WebDAV, Amazon S3 and SCP client for Microsoft Windows. Get it from the official website: https://winscp.net