filmov
tv
MySQL Installation and Setup for C++ Development on Visual Studio

Показать описание
UPDATE 5 August 2020:
I am happy for those of you who managed get your setup working. I am sorry to those who could not despite following my steps. I am nowhere near proficient in this domain, and happened to need this setup at that time. Since then, I do not require it anymore. I spent hours figuring out what worked for my setup and these are the steps for me. It may or may not work for you, and I admit I wouldn't know how to make it work if your setup is different from mine. Apologies in advance to whom I am not able to provide any good advice. Wishing you the best.
------------------------------------------------------------------------------------------------------------------------------------------------------------
Step-by-step tutorial in installing MySQL Server and Connector/C++ 8.0.11 for C++ application development on Visual Studio Community 2017. This tutorial also shows the end result of running a simple C++ Windows Console Application that connects to the MySQL Server and displays table data.
System specs for this tutorial
⦁ Windows 10 Professional
⦁ 64 Bit machine
⦁ Visual Studio Community 2017 (with Microsoft .NET Framework version 4.7.03056)
⦁ MySQL Community Server 8.0.11
⦁ MySQL Connector/C++ version 8.0.11
(Boost Libraries NOT REQUIRED)
Tutorial Steps
2. Using MySQL Installer install:
a. MySQL Community Server 8.0.11
b. MySQL Connector/C++ version 8.0.11
3. Update the relevant include and lib directories in Visual Studio Community 2017
a. C:\Program Files\MySQL\Connector C++ 1.1\include
b. C:\Program Files\MySQL\MySQL Server 8.0\include
c. C:\Program Files\MySQL\Connector C++ 1.1\lib\opt
d. C:\Program Files\MySQL\MySQL Server 8.0\lib
4. Code, build, run
to the executable directory
C:\Program Files\MySQL\MySQL Server 8.0\bin to the executable directory
SQL Statements to create test database, table and data:
CREATE DATABASE testdb;
USE testdb;
CREATE TABLE test (id int, name varchar(32), score int);
INSERT INTO test (id, name, score) VALUES (1, "Marianne", 89);
INSERT INTO test (id, name, score) VALUES (2, "Jimmy", 62);
INSERT INTO test (id, name, score) VALUES (3, "Ling", 78);
SELECT * FROM test;
Simple C++ Windows Console Source Code to connect to MySQL Server:
I am happy for those of you who managed get your setup working. I am sorry to those who could not despite following my steps. I am nowhere near proficient in this domain, and happened to need this setup at that time. Since then, I do not require it anymore. I spent hours figuring out what worked for my setup and these are the steps for me. It may or may not work for you, and I admit I wouldn't know how to make it work if your setup is different from mine. Apologies in advance to whom I am not able to provide any good advice. Wishing you the best.
------------------------------------------------------------------------------------------------------------------------------------------------------------
Step-by-step tutorial in installing MySQL Server and Connector/C++ 8.0.11 for C++ application development on Visual Studio Community 2017. This tutorial also shows the end result of running a simple C++ Windows Console Application that connects to the MySQL Server and displays table data.
System specs for this tutorial
⦁ Windows 10 Professional
⦁ 64 Bit machine
⦁ Visual Studio Community 2017 (with Microsoft .NET Framework version 4.7.03056)
⦁ MySQL Community Server 8.0.11
⦁ MySQL Connector/C++ version 8.0.11
(Boost Libraries NOT REQUIRED)
Tutorial Steps
2. Using MySQL Installer install:
a. MySQL Community Server 8.0.11
b. MySQL Connector/C++ version 8.0.11
3. Update the relevant include and lib directories in Visual Studio Community 2017
a. C:\Program Files\MySQL\Connector C++ 1.1\include
b. C:\Program Files\MySQL\MySQL Server 8.0\include
c. C:\Program Files\MySQL\Connector C++ 1.1\lib\opt
d. C:\Program Files\MySQL\MySQL Server 8.0\lib
4. Code, build, run
to the executable directory
C:\Program Files\MySQL\MySQL Server 8.0\bin to the executable directory
SQL Statements to create test database, table and data:
CREATE DATABASE testdb;
USE testdb;
CREATE TABLE test (id int, name varchar(32), score int);
INSERT INTO test (id, name, score) VALUES (1, "Marianne", 89);
INSERT INTO test (id, name, score) VALUES (2, "Jimmy", 62);
INSERT INTO test (id, name, score) VALUES (3, "Ling", 78);
SELECT * FROM test;
Simple C++ Windows Console Source Code to connect to MySQL Server:
Комментарии