ok, how do we enable this in phpmyadmin? I added to the config file per an article I found, but it changed nothing.They're hexadecimal, you can either enable the option to show it as a normal string in phpMyAdmin or find a hexadecimal converter
ok, how do we enable this in phpmyadmin? I added to the config file per an article I found, but it changed nothing.
Showing it as a normal string won't convert it to a human readable IP address. You will want to use a hex to IP convertor tool. For example: http://sami.on.eniten.com/hex2ip/
$cfg['DisplayBinaryAsHex'] = false;
Chris, thank you for removing potentially sensitive data. I did not know it was sensitive, because I thought the values shown in the IP column could not be decoded without other data from other tables. I do not understand very well how that data is works.FWIW your MySQL may well have a function available which will convert the IP to a readable IPv4 address:
Code:SELECT attempt_id, login, attempt_date, INET_NTOA(CONV(HEX(ip_address), 16, 10)) AS ip_address FROM xf_login_attempt
Right... but it will then display it as binary (unreadable characters), not an IP address. @Dan Allen wants to see the IP address, not the raw binary (how it's stored). At least displaying it as hex, you can use a tool to convert it to an IP.
That makes sense. IP as a string needs let's say 16 characters. So I could save 1G of disk with only 60million records containing IP addresses. Well worth the extra time it takes for using the special functions and such. Up till now, I have always been partial to storing data in a readable form. I guess I thought that was a way to keep things simple and easy to work with, which is necessary, due to the limitations of my brain.Binary data takes ~8x less space than storing as a string. It also allows doing things like ranged searches (for example a range of IPs), which storing it as a sting does not. The IPs XenForo stores are intended to be used with the PHP functions XenForo has to convert to/from human readable form.
8x ?Binary data takes ~8x less space than storing as a string.
Oops, not 8x... not sure what I was thinking... but here's the storage space broken down...8x ?
Why is that?
We use essential cookies to make this site work, and optional cookies to enhance your experience.