Assistance With A Maria DB Form
Downloading, Installing, Importing Data, and running a Query in MariaDB.
MAC
If using a Mac, use this link to download MariaDB 10.4.13 GA for Mac OS. This is not an option.
Download link: https://downloads.mariadb.org/
To install on a Mac, go to the following website for instructions. https://mariadb.com/kb/en/installing-mariadb-on-macos-using-homebrew/
WINDOWS
If you are using a PC, you will need to install version 10.4.13-GA of MariaDB. This is not an option – it must be version 10.4.13-GA. Make sure to pick the correct operating system version for the machine you are install MariaDB onto.
Download link: https://mariadb.com/downloads/
Installing MariaDB MSI Packages on Windows setup instructions:
https://mariadb.com/kb/en/installing-mariadb-msi-packages-on-windows/
Follow the instructions for installing MariaDB on Windows
Database Authentication/Security Related Properties
Database security properties
This dialog is shown if you selected the "Database instance" feature. Here, you can set the password for the "root" database user and specify whether root can access database from remote machines. The "Create anonymous account" setting allows for anonymous (non-authenticated) users. It is off by default and it is not recommended to change this setting. Note, you can uncheck modify root password and go without one if your machine has your account set up the same as administrator.
Please note the following change on “Other Database Properties”, the wizard screen on the left is replaced by the screen on the right. Accept the default service name, buffer pool size, and page size as shown. CHANGE NOTHING! Hit next to continue with the installation.
The next screen on the wizard will allow anonymous usage statistics to be sent to the developers. Leave this unchecked and click next. Again, CHANGE NOTHING!
The remaining installation steps are correct.
IF it does not install, and instead you get a "MariaDB 10.4.13 MSI fails" or a fail, then do the following:
The Resolution
· Download the Microsoft Visual C++ Redistributable for Visual Studio 2019. https://aka.ms/vs/16/release/vc_redist.x64.exe . Download, click, install
· Then install 10.4.13
New Entries in Start Menu
Installation will add some entries in the Start Menu:
· Command Prompt - Starts a command prompt. Environment is set such that "bin" directory of the installation is included into PATH environment variable, i.e you can use this command prompt to issue MariaDB commands (mysqldadmin, mysql etc...)
· Database directory - Opens the data directory in Explorer.
· Error log - Opens the database error log in Notepad.
· my.ini - Opens the database configuration file my.ini in Notepad.
· HeidiSQL
· MySQL Client - Starts command line client mysql.exe
Preparing Restaurant File
To load data into the database, download the restaurant_review_sql_dump.txt.zip file from the assignment information. You will need to unzip the file.
If you need directions on how to unzip a file, please use this link:
https://www.wikihow.com/Unzip-a-File
If you do not have WinZip, you will need to sign up for a free trial and/or buy it.
Extract the text file to the HeidiSQL folder that was created in your Documents folder. If no folder was created, you can go to your documents folder and create one or open up HeidiSQL and it will create one for you.
Open the HeidiSQL client from the start menu -> MariaDB 10.4 -> HeidiSQL.
Click on Session name. Or double click on HeidiSQL icon to start.
Your session manager will open.
Click on New. This will create an unnamed session. Please note that if you chose to use a password that you need to enter first before moving to next step.
Now click on the advance tab.
Go down to startup script and click the folder.
Browse to the Documents -> HeidiSQL folder. Once there, change the “Files of type:” drop-down to “All Files”. The SQL dump file will then be visible. Click on the file and click on the open button.
Now click open at the bottom of the advance tab and wait.
Click on yes
This will open up the database.
Select the review in the tree and click the new query button beside the existing query window to enter and run your query for the assignment.
IF YOU DO NOT SEE REVIEW, click on the refresh button and you will see the review area.
If no review is shown and refresh does not work, try uninstalling and install again. Else, go to restoring data on the MariaDB website.
https://mariadb.com/kb/en/restoring-data-from-dump-files/
Query
The following links show you how to run a query in HeidiSQL.
See the following on how to run a MariaDB query:
https://mariadb.com/kb/en/useful-mariadb-queries/
https://www.heidisql.com/screenshots.php?which=query
https://stackoverflow.com/questions/26585905/heidisql-how-to-select-individual-columns-explicitly-into-query-window
Remember, you are creating your own simple query to run on the data in restaurant review. You may wish to write a query you find 10 or 15 restaurants the serve your favorite cuisine.
1