Jump to content

Why would this not work?


carlg

Recommended Posts

This is in a shell script

 

This works perfectly fine

 

mysql -u$dbuser -p$dbpass --database=db -e "SELECT * FROM mytable"

 

But this gives me an access denied error (permissions on dir are OK)

mysql -u$dbuser -p$dbpass --database=db -e "SELECT * INTO OUTFILE '../tmp/mytable.unl' FIELDS TERMINATED BY '|' FROM mytable"

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/73898-why-would-this-not-work/
Share on other sites

I got it to work using the mysql root user as the uname and password and I had to change the file path to an absolute path.

 

I still can't get it to work with a normal db user.

 

I even granted the user FILE permissions and made sure the linux dir perms were correct.

 

Still no luck.

I got it to work using the mysql root user as the uname and password and I had to change the file path to an absolute path.

 

I still can't get it to work with a normal db user.

 

I even granted the user FILE permissions and made sure the linux dir perms were correct.

 

Still no luck.

Has nothing to do with the FS... just the DB... since root works and normal user doesn't, the FILE permission obviously wasn't applied... did you FLUSH PRVILEDGES, or restart the server?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.