Obviously if you cannot connect with SQLyog then you cannot do it with SQLyog. To SET OLD_PASSWORD for the SQLyog user you will need to do so from a client that can connect and has sufficient privileges (I think SUPER privilege). Or you may edit the configuration file.