XF 1.5 Deleting an IP address from the DB


Well-known member
During an import process, the admin IP address was erroneously added to the accounts of a number of users.
This would create significant problems as soon as a multiple accounts checker is activated.
How can I query the DB for this IP address and remove all instances of it?

I see the IPs are in binary format, but for soem reason when I search for the binary I get no results.


Well-known member
How weird. I get this when running the select version:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM xf_ip WHERE ip = UNHEX(LPAD(HEX(INET_ATON('')), 8, '0')) LIMIT' at line 1


Well-known member
For anyone wanting to test:
SELECT * FROM xf_ip WHERE ip = UNHEX(LPAD(HEX(INET_ATON('')), 8, '0'));

I managed to run this on XF2 database and it worked. Replace "SELECT *" with "DELETE" to actually delete. It won't show the IP address when you do this, for me it just said "user".