1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Remove one IP from database wherever it occurs?

Discussion in 'XenForo Questions and Support' started by alex2k5, Sep 11, 2016.

  1. alex2k5

    alex2k5 Member

    Have a proxy set up server side, so for a while every user was logged with the server's IP. Now when running the "other users" IP check from profile pages, it brings up thousands of users.

    I've since added

    as per other thread's suggestions.

    But, want to scrub the server IP so that feature can work properly again.

    Any direction? Thanks!
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You want the xf_ip table. You just need to find the value associated with that IP and delete all of those records.

    I am uncertain if newer MySQL IP functions are appropriate here. But you can run this query to return the most used IP values which is probably good enough to determine which value is the offending IP:

    SELECT ip, COUNT(*) AS 'Total', COUNT(DISTINCT user_id) AS 'Unique Users'
    FROM xf_ip
    GROUP BY ip
    LIMIT 0,100
    Once you have the value you can delete those records with this query:

    FROM xf_ip
    WHERE ip = X'4930c2c8'
    Fill in the value you found in the first query.
    alex2k5 and eva2000 like this.
  3. alex2k5

    alex2k5 Member

    Thanks, I'll give it a test later today. Appreciate it!

Share This Page