The below snippet will create a MySQL user and grant them all permissions on the given database. The % wildcard identifier will allow this particular user to be accessible via any hostname. While the * wildcard will grant the user access to all tables within the supplied database. You can change either to match your specific needs.
This is a very handy command to avoid running the same query twice. It will tell you how many total rows there are when you only need a handful. You need to run the second query immediately following the first. If you leave out SQL_CALC_FOUND_ROWS from the first query FOUND_ROWS() will simply return the number or results you got, 10 in this case.