How to connect a mySQL database with a website

Hi @all,

Would you please make a tutorial, how to connect a mySQL database with a HTML website? Or is there already a guideline and I didn´t find it? If possible in German but English would also be OK.

I want to create a database and connect it to my website. On the website there will be a forum and other things. To comment in the forum a user registration is needed beforehand, so I think I will need a database for storing the user data. Or is there another solution for this and I don´t need a mySQL database? On my dedicated root server I have Ubuntu 20.04 installed.

Best regards heusmich


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

In order to have your website communicate with a MySQL database, you would need a server-side language to do this for you.

You could use a Language like PHP for example or Python. The language would depend on the skillset that you and your team have and your personal preferences.

You can take a look at this article on how to install PHP and MySQL on your server:

Alternatively, you could use a CMS like WordPress which would allow you to build a forum/blog without actually doing much coding as you will be able to install some freely available plugins.

You can follow the steps here on how to install WordPress on your server:

Hope that this helps! Regards, Bobby