Yes, there is a third-party plugin, designed by Google to assist you in this feature, you can use this plugin... but the only problem you might get across is the UI of your website. Anyways, try it at:
https://www.google.com/cse/[
^], you should also look in the footer links, all of the resources for this plugin are already given.
Secondly, I have never done any work in PHP and MySQL but yes, I can give you a suggestion for the search engine of your website. You see, the search queries can be generated by appending the WHERE clause, with a LIKE command and passing the "keyword" of your search to it, MySQL would return all of the rows that have a match.
MySQL string comparison functions[
^]
Finally, I would like to provide a few resources that you might find helpfull,
http://www.webreference.com/programming/php/search/index.html[
^]
http://mrbool.com/how-to-create-your-own-search-engine-with-php-and-mysql/25836[
^]
https://www.udemy.com/creating-a-search-engine-in-php/[
^]
Article on CodeProject:
Making a Search Engine[
^]