the present disclosure relates to a macrolide compound as shown by formula i and pharmaceutically acceptable salt thereof . the compound of the present disclosure is an antibacterial agent , and can be used to treat various bacterial and protozoal infections . the present disclosure further relates to the preparation method of the compound and a pharmaceutical composition thereof .