Prepare a dog toilet in the bathroom. Put paper towels with dog urine and feces in the dog toilet. When the dog needs to go to the toilet, take the dog to the dog toilet to go to the toilet. Once the dog smells it, he will know that this is where he needs to go to the toilet. If you carry out this kind of training several times, the dog will slowly remember the rules. It is unlikely that the training will be successful after one or two times.
When the dog takes the initiative to go to the toilet in the designated place, reward it with snacks and praise it. But when it makes a mistake, criticize it severely and correct its behavior.
You can also not prepare a dog toilet, just place the paper towels stained with dog urine and feces in the bathroom, and wait for the owner to deal with it after the dog has excreted.