I have to use system command from wordpress plugin, which should run mysqldump command from the plugin. It generates 0 byte size sql file, so I manually tested to run it from terminal, mysqldump only works at the terminal opened by “open site shell” menu from Local control panel.
I think it would be permission issue, how can we run mysqldump from any credentials especially plugin settings page from wordpress admin page?
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
Plugin is only one that I am developing and testing. It has code the above to run mysqldump command. I would like to export database table and the command works from Open site shell menu from Local control panel, its terminal works, but regular terminal it does not. I think permissioni is granted from Open site shell menu by Local, not for regular terminal ^^
Local app’s Adminer is not for plugin working, I would like to dump MySQL table from plugin page I am making ^^ If there is way to elevate user permission as in Open site shell menu’s terminal, it would be solved, I don’t have idea about this.
I think Local is very great tool to shortens the way to make wordpress development environment wth convenient ways, I appreciate the care of developing and providing for free too.
Many people would use my plugin in this tool, so I would like to know how to resolve my issue.
I think ~/.config/Local/ssh-entry directory’s *.sh files can be used for constructing user permission and environment variables, if I pass the command ‘~/.config/Local/ssh-entry/filename.sh && mysqldump -options’ to PHP function system();, is this predicted to be working?
I have figured out other way allowed, such that rather than using mysqldump, using SQL commands by wordpress API and from the query result assembly into text file.
I think for security reason, which .sh file is for current instance of wordpress site is hardly unleased so figured out the way at the above.
Thank you for providing convenient app for wordpress setup ^^
We’re glad you were able to get somewhere with this! Thank you for your patience and communication with us. I was waiting on some follow up with the Devs to see if they could provide some more insight but they’ve had to prioritize some other end of year work
If you have any other questions or concerns don’t hesitate to reach back out. We are always happy to help!