I want to login MySql with exec.Command of GoLang, I am sure that I can login success, but I can not enter into MySql script interface.
The program do not output any error, it exit after finished, that is not what I expected, I want to enter into the mysql script interface.
The code is like this:
host := "localhost"
user := "root"
password := "root"
cmd := exec.Command("mysql","-h"+host,"-u"+user,"-p"+password)
cmd.Output()
I want to see this after the program run:
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
then I can write mysql script continue. thanks!