I recently looked at how to default a column as a UUID/GUID in MySQL using a trigger, but it’s not replication safe when using statement based replication. This post looks at an alternative to using triggers by using a variable instead.
If you order a string column that contains only numeric values with MySQL, it will order them as string values, e.g.: 1, 10, 100, 2, 3, 31, 32, 4, etc. If you want to order them as if they were an integer, cast them in the order by clause.