Database Connection in C++ – MySQL or MariaDB



Database Connection in C++ – MySQL or MariaDB

Database Connection in C++ - MySQL or MariaDB

Time to connect to a database using pure C++, no codeblocks, no special IDEs, no QT, just C++ and MySQL.

NOTE: You need to have libmysqlclient-dev installed if you’re using MySQL (linux)

Running the code: g++ connectdb.cpp -o output -L/usr/include/mariadb/mysql -lmariadbclient
Note: Remember to modify if you don’t use MariaDB

Need the source code? Click here: https://github.com/WeebNetsu/database-connection-cpp

Timestams:
00:00 – Intro
00:28 – Rant
01:24 – Example Program
02:14 – What You Need
03:06 – Creating the files
04:00 – Template Code
05:25 – Coding Everything
16:30 – The main() Code
24:33 – Running the Code (Info)
26:49 – Fixing Errors
27:18 – Running the Code
27:33 – Outro

For more programming videos, feel free to subscribe to my 2nd channel: https://www.youtube.com/channel/UCZkCdex94Hp-3Aa-42kPhHg

Python Programming Tutorials: https://www.youtube.com/playlist?list=PLYBJzqz8zpWasL5mTe0t9W2cXrv7rnnsG
Japanese Lessons: https://www.youtube.com/playlist?list=PLYBJzqz8zpWYy-iJ0xckeOjCCE2roN9Ww
Delphi Programming Tutorials: https://www.youtube.com/playlist?list=PLYBJzqz8zpWbKtfi2EiYTv4TeaWcR1I6k
How-to videos: https://www.youtube.com/playlist?list=PLYBJzqz8zpWbp2DxyVGUCqxSZaCwDvU3C
Crash Courses: https://www.youtube.com/playlist?list=PLYBJzqz8zpWbmPw2E0ywUEuhw6FEwVR0U

The stack: https://stackoverflow.com/questions/64755708/error-getting-output-from-mysql-h-using-c-and-g/64755837#64755837

Thank you, thank you, thank you, thank you, thank you: https://www.codingfriends.com/index.php/2010/02/17/mysql-connection-example/comment-page-1/

Group Chats:
Weeb Chat: https://t.me/weeb_haven
Programmer Haven: https://t.me/programmer_haven

You can contact me on:
Email: [email protected]
Discord: https://discord.gg/NGtD9s6
Kitsu: https://kitsu.io/users/Netsu
Twitter: @stevesteacherYT or click here: https://twitter.com/stevesteacherYT?s=09

Any suggestions? Leave it in the comment section or contact me somewhere else!

Thank you for watching!

Comments are closed.