‘transactions.ip’ is already an integer, which is why the questioner is using INT_ATON. It's no good trying to match it directly against a string like/regexp, you would have to convert it back to an IPv4 address first using the reverse function INT_NTOA:
SELECT * FROM transactions WHERE INT_NTOA(ip) LIKE '127.%';
This requires a complete table scan (defeating indexes) to convert and compare.
I want the ability to do a regex search for all ip's with a particular first octet (i.e. 127)
However, in the case where you want to compare against the front part of an IP address, you can take advantage of the fact that the first octet is stored in the most significant bits of the number, and say:
SELECT * FROM transactions WHERE ip BETWEEN INT_NTOA('127.0.0.0') AND INT_NTOA('127.255.255.255');
Which can be done using an index on ‘ip’ so could be considerably more efficient.