r/programminghelp • u/Firm_Recipe_2807 • Oct 17 '24
C++ Accessing MySQL database in C++ (Visual Studio)
I have a MySQL database using my website servers on Bluehost. I also have a game made in C++ using Visual Studio, and my database is on cPanel. I'm wondering how I'd go about accessing the database in C++ in order to update values, add rows, and pull values from the table. I've seen APIs such as the MySQL C++ connector. But I'm not sure how to use it. I'm more of a beginner when it comes to data and SQL, so I don't know to much about it.
1
Upvotes
View all comments
Show parent comment
1
u/edover Oct 23 '24
That's really the only library that's any good. Just follow their setup and examples.
https://dev.mysql.com/doc/dev/connector-cpp/latest/usage.html
https://dev.mysql.com/doc/dev/connector-cpp/latest/devapi_example.html