Symbol-pair codes are used to protect against symbol-pair errors in high density data storage systems. One of the most important tasks in symbol-pair coding theory is to design MDS codes. MDS symbol-pair codes are optimal in the sense that such codes attain the Singleton bound. In this paper, a new class of MDS symbol-pair codes with code-length 5p and optimal pair distance of 7 is established. It is shown that for any prime p ≡ 1 (mod 5), we can always construct four p-ary MDS symbol-pair cyclic codes of length 5p of largest possible pair distance 7. We also completely determined all MDS symbol-pair and MDS b-symbol codes of length p s and 2p s over F p m + uF p m by filling in some missing cases, and rectifying some gaps in Type 3 codes of recent papers. As an applications of our results, we use MAGMA to provide many examples of new MDS codes over F p m and F p m + uF p m .