A method, executed by a server, for automatic login across terminal devices, comprising: obtaining a first corresponding relationship that is stored after a terminal device logs in successfully, the first corresponding relationship is stored among unique identification information of the terminal device, a login Internet Protocol address of the terminal device, and a user login identity of the terminal device; obtaining an second corresponding relationships between unique identification information of terminal devices of the same user; storing the first corresponding relationship and the second corresponding relationship as server-stored relationships; acquiring a login request that is sent by a first terminal device and carries first unique identification information of the first terminal device and a first login Internet Protocol address of the first terminal device; querying the server-stored relationships according to the first login Internet Protocol address, whether there exists a second terminal device that has logged in successfully from the same Internet Protocol address; if yes, querying the server-stored relationships according to the first unique identification information whether there exists a relationship between the first unique identification information of the first terminal device and a second unique identification information of the second terminal device indicating that the first terminal device and the second terminal device are of the same user or are associated with each other; and if yes, sending to a browser corresponding to a current login page of the first terminal device, a data cookie corresponding to a user login identity of the second terminal device that has logged in successfully, so that the first terminal device logs in automatically. obtaining a first corresponding relationship that is stored after a terminal device logs in successfully, the first corresponding relationship is stored among unique identification information of the terminal device, a login Internet Protocol address of the terminal device, and a user login identity of the terminal device; obtaining an second corresponding relationships between unique identification information of terminal devices of the same user; storing the first corresponding relationship and the second corresponding relationship as server-stored relationships; acquiring a login request that is sent by a first terminal device and carries first unique identification information of the first terminal device and a first login Internet Protocol address of the first terminal device; querying the server-stored relationships according to the first login Internet Protocol address, whether there exists a second terminal device that has logged in successfully from the same Internet Protocol address; if yes, querying the server-stored relationships according to the first unique identification information whether there exists a relationship between the first unique identification information of the first terminal device and a second unique identification information of the second terminal device indicating that the first terminal device and the second terminal device are of the same user or are associated with each other; and if yes, sending to a browser corresponding to a current login page of the first terminal device, a data cookie corresponding to a user login identity of the second terminal device that has logged in successfully, so that the first terminal device logs in automatically.