when to use “do you mind my doing”, “do you mind me doing”

Both expressions are used.

However,

Do you mind if I open the window?  (Polite and normal.)

Do you mind my opening the window?  (Polite, educated.)

Do you mind me opening the window?  (Polite, uneducated or partially educated.)