Can’t connect to server error on raspberry pi
So this is my first time setting up a web server on my raspberry pi and the goal is to be able to take sensor readings from an arduino nano I have connected to my raspberry pi. These readings will be stored in a database and then will be pulled and displayed on a website continuously. I followed a Youtube tutorial on how to set up a LAMP stack and i was able to create the database through phpmyadmin. i could not install mysql.connector as it kept on returning an error that said no installation candidate. I installed mysqldb instead after seeing a command online that gave it as an alternative for mysql.connector. I have tried running my python code and it returns a can’t connect to server error. The first attachment is of the image of the error that is returned.
I am not also confident about how i set up my LAMP stack so below are the steps and commands i used