Q: How to install libraries (mysql connector cpp) on Mac using terminal and make things simple as in the case of Ubuntu I will share an example. 
I had to install mysql connector c++ libraries for my project. 
To install connector c++ on my Mac, i had to build it from the source code and it takes a lot of effort because you get errors sometimes and then it is troublesome, something which should have been done in a short time. 
In case of Ubuntu, I just had to write one command in the terminal, and wow, everything just got done automatically. 
apt-get install libmysqlcppconn7

Does anybody know any similar command in mac, using brew or macports? 
I tried to find but I guess I didn't get any results to satisfaction. 
And if there is not, can anyone guide me so that I can make it possible, like I think it's possible for mac, if it is possible in ubuntu. 
Please guide me, an answer in a bit detail would be so much appreciated. 

A: Probably the nearest thing to apt-get on a mac is brew
Once it is set up (and this isn't difficult) "brew install mysql-connector-c++" will install on the mac
