Awesome
Perfect - MySQL Connector
<p align="center"> <a href="http://perfect.org/get-involved.html" target="_blank"> <img src="http://perfect.org/assets/github/perfect_github_2_0_0.jpg" alt="Get Involed with Perfect!" width="854" /> </a> </p> <p align="center"> <a href="https://github.com/PerfectlySoft/Perfect" target="_blank"> <img src="http://www.perfect.org/github/Perfect_GH_button_1_Star.jpg" alt="Star Perfect On Github" /> </a> <a href="http://stackoverflow.com/questions/tagged/perfect" target="_blank"> <img src="http://www.perfect.org/github/perfect_gh_button_2_SO.jpg" alt="Stack Overflow" /> </a> <a href="https://twitter.com/perfectlysoft" target="_blank"> <img src="http://www.perfect.org/github/Perfect_GH_button_3_twit.jpg" alt="Follow Perfect on Twitter" /> </a> <a href="http://perfect.ly" target="_blank"> <img src="http://www.perfect.org/github/Perfect_GH_button_4_slack.jpg" alt="Join the Perfect Slack" /> </a> </p> <p align="center"> <a href="https://developer.apple.com/swift/" target="_blank"> <img src="https://img.shields.io/badge/Swift-4.1-orange.svg?style=flat" alt="Swift 4.1"> </a> <a href="https://developer.apple.com/swift/" target="_blank"> <img src="https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat" alt="Platforms OS X | Linux"> </a> <a href="http://perfect.org/licensing.html" target="_blank"> <img src="https://img.shields.io/badge/License-Apache-lightgrey.svg?style=flat" alt="License Apache"> </a> <a href="http://twitter.com/PerfectlySoft" target="_blank"> <img src="https://img.shields.io/badge/Twitter-@PerfectlySoft-blue.svg?style=flat" alt="PerfectlySoft Twitter"> </a> <a href="http://perfect.ly" target="_blank"> <img src="http://perfect.ly/badge.svg" alt="Slack Status"> </a> </p>This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers.
This package builds with Swift Package Manager and is part of the Perfect project. It was written to be stand-alone and so does not require PerfectLib or any other components.
Ensure you have installed and activated the latest Swift 4.1.2 tool chain.
macOS Build Notes
This package requires the Home Brew build of MySQL.
To install Home Brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To install MySQL:
brew install mysql@5.7
Unfortunately, at this point in time you will need to edit the mysqlclient.pc file located here:
/usr/local/lib/pkgconfig/mysqlclient.pc
Remove the occurrance of "-fno-omit-frame-pointer". This file is read-only by default so you will need to change that first.
If you get a link error while build in Xcode, please, close XCode, open a New terminal, go to the place where you have your Packages.swift and build the project again:
swift package generate-xcodeproj
After this you have to set the path for libraries again.
Linux Build Notes
Ensure that you have installed libmysqlclient-dev for MySQL version 5.6 or greater.
sudo apt-get install libmysqlclient-dev
Please note that Ubuntu 14 defaults to including a version of MySQL client which will not compile with this package. Install MySQL client version 5.6 or greater.
Building
Add this project as a dependency in your Package.swift file.
.package(url:"https://github.com/PerfectlySoft/Perfect-MySQL.git", from: "3.0.0")
Documentation
For more information, please visit perfect.org.