Hi FrogWarrior, welcome to the forums
Learning how to exploit vulnerabilities is a field in it's own right.
Believe me, there are so many variations it would take great effort and time to learn even most of them.
IMHO the best use of your time and effort is to code using best practice, with security in mind right from the start, not as an afterthought.
As far as MySQL, don't use PHP's deprecated mysql functions. Use mysqli or PDO instead, taking advantage of the improvements eg prepared statements, bound parameters.
If you're intent on learning how to hack, sorry but the SitePoint forums are not the place for that.
But if you want to learn how to write secure code, this is the right place.