In the database, the IP addresses and Visitor IDs are stored in Binary form for storage efficiency. To display these values correctly you can use the following SQL query:

SELECT inet_ntoa(conv(hex(location_ip), 16, 10)) as ip, conv(hex(idvisitor), 16, 10) as visitorId FROM piwik_log_visit;