![]() ![]() My first experiences with databases were SQLServer and MySQL (MariaDB) relational databases, there are other possibilities like MongoDB and InfluxDB Non-SQL databases.Īs you have seen I like efficient systems and I try to use interfaces in the minimum, I prefer command line, in the case of Raspberry Pi it must be very recursive given the limited resources of RAM and storage space. ![]() Recommendation: For a more detailed explanation step by step I recommend watching the full video I Installation Dashboard Grafana in Raspberry Pi 3 B or B+:PDAControl available on our Youtube channel PDAControl. Note: this is a brief introduction, perhaps later explain a little in detail, but I recommend looking for tutorials on the internet about Query in MySQL, there should be thousands of tutorials. ![]() humidity (TYPE Double or floating with decimals)ĬREATE TABLE esp32_dht11 (dateandtime DATETIME, sensor VARCHAR(32), temperature DOUBLE, humidity DOUBLE).temperature (TYPE Double or floating with decimals).sensor (TYPE Varchar or string of 32 characters).dateandtime (TYPE Datetime or Time Format).This table consists of 4 columns, the table “esp32_dht11” I will advance the process a bit, for my future tests I will create a simple table to send data from an ESP32 + Node-RED, take this table as an example, adapt to your needs GRANT ALL PRIVILEGES ON grafana_db.* TO PRIVILEGES Use database “grafana_db” USE grafana_db Ĭreate a new user “grafana_user” and assign the password “password” CREATE USER IDENTIFIED BY 'password' Īssign all the permissions to the user “grafana_user” on the database “grafana_db”. sudo mysql -u root -p -h localhostĬreate new database “grafana_db”. Press “Enter”, no password is required for the “root” user, we enter MariaDB to enter Query. Verify status MySQL (MariaDB), it must be running sudo /etc/init.d/mysql status Install MySQL database server sudo apt-get install mysql-server -y Remove obsolete packages sudo apt autoremove -y Update list of available packages sudo apt update Next we will install MySQL and perform the respective configuration creation of users and databases. Perform many tests to create a password for this user that by default MySQL does not require passwords, but to connect MySQL with other applications such as Node-RED, Python and Grafana authentication is required by security issues. Actually the method of installation of MySQL has varied, one of the biggest inconveniences of the configuration of the user “root” or administrator. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |