Type '\c' to clear the current input statement. Server version: 10.3.11-MariaDB MariaDB ServerĬopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. So I hope some of you guys can help me out.So, please follow our previous tutorial to learn How to Secure Mariadb Server using mysql_secure_installation tool.Ĭonnecting to the MariaDB from Command LineĠ1- Now, type the below command to connect to the MariaDB server through the terminal as the root account: $ mysql -u root -pĠ2- Finally, enter the password of the root user account, and you will get the MariaDB shell, as shown below: Welcome to the MariaDB monitor. > Installing the python developer tools: yum -y install openssl-devel bzip2-devel libffi-devel | yum -y groupinstall "Development Tools"īut I can't figure out what i'm doing wrong. > Installing the connector from mariaDB's own website: link to own webside I have to install the Python3 plugin MariaDB. I'm working with a Linux CentOS 8 system, where I have to put the script on. Print(f"Error connecting to MariaDB Platform: ")īut now my real issue is starting. Print ("Total", cursor.rowcount, "Data is succesvol in database gegevens.db geschreven") Verkregen_data = (machine, memory, disk, cpu)Ĭursor.execute(insert_query, verkregen_data) Insert_query = """INSERT INTO info (machine, memory, disk, cpu) VALUES (?, ?, ?, ?) """ So said and done, I have created a Python script: import psutilĭef insert_data(machine, memory, disk, cpu): I have to build a Python script that connects to a database and put information into it. Currently i'm working on a school project where I have to use MariaDB in a Python3 assignment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |