use mysqldump to back up data from the MySQL server on the web server
if so:
mysqldump -hxxx.xxx.xx.xx -uusername -ppwd db table --where="order_id > 4300284 and order_id < 4300293" > /xxxx/file.sql
enter the password in clear text, and you will be prompted:
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don"t want to restore GTIDs, pass-set-gtid-purged=OFF. To make a complete dump, pass-- all-databases-- triggers-- routines-- events
what I want to know is that when using the mysqldump command, enter the password without plaintext, that is,
mysqldump -hxxx.xxx.xx.xx -uusername -p db table --where="order_id > 4300284 and order_id < 4300263" > /xxxx/file.sql
is similar to executing directly in Linux and then entering the password by pressing enter, but how do you achieve similar functions in PHP programs?
that is to say, after executing the previous command, it"s time to enter the password. How can PHP pass the password to Linux
Thank you