0% found this document useful (0 votes)
4 views14 pages

C# App for Remote MySQL Management

The document outlines the creation of a C# application for managing a MySQL database installed on a Raspberry Pi, including steps for user creation and configuration for external connections. It details the installation of necessary components, such as MySql.Data and MySqlBackup, and describes the graphical interface and functionalities for managing client data. The application allows for displaying, modifying, and deleting client information, as well as saving and restoring the database.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views14 pages

C# App for Remote MySQL Management

The document outlines the creation of a C# application for managing a MySQL database installed on a Raspberry Pi, including steps for user creation and configuration for external connections. It details the installation of necessary components, such as MySql.Data and MySqlBackup, and describes the graphical interface and functionalities for managing client data. The application allows for displaying, modifying, and deleting client information, as well as saving and restoring the database.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Creation of an application in C# to manage a database

data (installed on Raspberry Pi)

The MySql database being installed on a RaspberryPi and the application that will be created in C# will be
Used to administer it remotely on a Windows computer, some modifications need to be made.
1 - On the Raspberry:
We are going to connect to phpMyAdmin in order to create a new user intended to manage a database.
data at a distance.

New user

Configuration
Important: the %
2-

Here we choose the privileges


for this account

Configure MySQL to accept external connections to the Raspberry Pi


Now that the rights have been granted, we will need to specify to MySQL that we want to accept
external connections to the Raspberry Pi.
To do this, we will edit the MySQL configuration files located in the folder "/etc/mysql".
The files to modify are [Link] and [Link].

After
to have

Line to be added in the 2 files!


If bind-address = [Link] exists, it should be commented out.
( #bind-address = [Link] )
apply all these modifications on the Raspberry Pi, we will now focus on the realization of
the application in C# with Visual Studio 2015 community. First of all, he
You need to install a dll ([Link]) in our application. To do this, you must first download it.
Connector/Net 8.0.11 on the site[Link] Install the file
download ([Link]) to your computer.

After following the instructions below in images:

Right click on the project name

Click on Add

Then onReference

The Reference Manager window opens and we configure it as below:


On tapemysqldans la
search window

We select and we
car [Link]
Below is the graphical interface for managing the database:

5 1 1

7
Part of the program for connecting to the database with the management of the 'Connection' button -
Disconnection
1

Section 'Customer Database':


2
It is made up of a GroupBox, a ListView, a ContextMenuStrip, and 2 Buttons. A Button 'Display'
Clients allows you to display the information contained in the TAB_clients database in the ListView. The Button
'Delete clients' deletes a client selected by the mouse. ContextMenuStrip is a menu that will be displayed with a
Right-click the mouse button. It will be used to modify or delete a client.
3
4
5
6
To add a new window go to: Project then Add a Windows form…

7
Addition of 2 buttons to save and restore the database:

These two functions use the class MySqlBackup. It is not installed by default in Visual Studio. For
to install it, you need to add it to our project by going to the solution explorer and right-clicking on
References and choose Manage NuGet packages…. In the NuGet Package Manager, search
MySqlBackup has been installed by Yasith Jayswardana.

(See below a screenshot:)

You might also like