Apenas isso é inseguro:
mysql -p=mypassword
porque desta forma pode ser visível quando ps é usado para visualizar os argumentos da linha de comando. Em suma, use sempre a opção -p , e quando a automação for desejada use um "arquivo de opções"
Consulte o link para obter mais informações:
This is convenient but insecure, because your password becomes visible to system status programs such as ps that may be invoked by other users to display command lines. MySQL clients typically overwrite the command-line password argument with zeros during their initialization sequence. However, there is still a brief interval during which the value is visible. Also, on some systems this overwriting strategy is ineffective and the password remains visible to ps. (SystemV Unix systems and perhaps others are subject to this problem.)