Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exec("mysql -uusername -ppassword <'export.sql'") return nothing

Status
Not open for further replies.

andrewxie

Programmer
May 29, 2003
15
US
Hi,
when I run
exec("mysql -uusername ppassword<'export.sql'");
on solaris9 it returns nothing.
I also tried
system("mysql -uusername -ppassword <'export.sql'")
it return nothing.
but when I run on windows xp
exec("mysql -uusername -ppassword -e \"source export.sql\"");
it works and returns records.

anybody any idea?

 
Did you try giving the host name in it.

exec("mysql -hxxx.xxx.xxx.xxx -uusername ppassword<'export.sql'");
 
I am not sure what can be problem from your solaris machine. Make sure that permissions were set appropriately. I tried the same thing from my Linux box with both exec and system, and it worked just fine. Did you try to capture any errors if there are any?
 
I find the problem. mysql has to be full path.

thank you anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top