A method for determining transmit power, comprising: determining , according to a preconfigured rule, transmit power used for sending a random access message; and sending the random access message to a base station by using the determined transmit power, characterized in that the determining , according to a preconfigured rule, transmit power used for sending a random access message comprises: determining, according to P = min{P MAX , P initial value +(N pre -1) ∗ ΔP rampup +(N-1) ∗ P compensation } or according to P = min{P MAX , P initial value +(N pre -1) ∗ [ΔP rampup +(N-1) ∗ (N pre -1) ∗ P step compensation ]}, the transmit power used for sending the random access message, wherein P is the transmit power used for sending the random access message, P MAX is maximum transmit power, P initial value is initial transmit power, ΔP rampup is an added value of transmit power for sending the random access message two consecutive times in a process of a current round of a random access attempt, N pre is a quantity of times for sending the random access message in the process of the current round of the random access attempt, N pre is an integer greater than 1 and less than or equal to N pre max , N pre max is a maximum quantity of attempts in the process of the current round of the random access attempt, N is a quantity of attempt rounds for the random access message, N is an integer greater than 1, P compensation is a compensation power by which the transmit power is increased each time in each round of the random access attempt compared with the transmit power for sending the random access message at a corresponding time in a previous round of the random access attempt, and P step compensation ]is a step compensation power by which the transmit power is increased each time in each round of the random access attempt compared with the transmit power for sending the random access message at a previous time in the current round of the random access attempt. determining , according to a preconfigured rule, transmit power used for sending a random access message; and sending the random access message to a base station by using the determined transmit power, characterized in that the determining , according to a preconfigured rule, transmit power used for sending a random access message comprises: determining, according to P = min{P MAX , P initial value +(N pre -1) ∗ ΔP rampup +(N-1) ∗ P compensation } or according to P = min{P MAX , P initial value +(N pre -1) ∗ [ΔP rampup +(N-1) ∗ (N pre -1) ∗ P step compensation ]}, the transmit power used for sending the random access message, wherein P is the transmit power used for sending the random access message, P MAX is maximum transmit power, P initial value is initial transmit power, ΔP rampup is an added value of transmit power for sending the random access message two consecutive times in a process of a current round of a random access attempt, N pre is a quantity of times for sending the random access message in the process of the current round of the random access attempt, N pre is an integer greater than 1 and less than or equal to N pre max , N pre max is a maximum quantity of attempts in the process of the current round of the random access attempt, N is a quantity of attempt rounds for the random access message, N is an integer greater than 1, P compensation is a compensation power by which the transmit power is increased each time in each round of the random access attempt compared with the transmit power for sending the random access message at a corresponding time in a previous round of the random access attempt, and P step compensation ]is a step compensation power by which the transmit power is increased each time in each round of the random access attempt compared with the transmit power for sending the random access message at a previous time in the current round of the random access attempt. <EOS>