One problem is in your command.
Code:
reg_user:~ > mysql -u root -p temp
This should be either:
reg_user:~ > mysql -u root -ptemp
or
reg_user:~ > mysql -u root -p
temp
Also check if there are other my.cnf files, such as /etc/my.conf ~/reg_user/.my.cnf /root/.my.cnf or /mysql/datadir/my.cnf.