Calling MySQL exe using PHP exec doesn't work

后端 未结 6 1099
一整个雨季
一整个雨季 2020-12-20 02:52

I have an extremely simple script with PHP exec, calling mysql command:

  $dbhost = \'localhost\';
  $dbuser = \'root\';
  $dbpass          


        
6条回答
  •  太阳男子
    2020-12-20 03:14

    Your script should work, but definitely try using the -e flag and the 'source' command instead of the < char as a matter of best practice.

    Chances are, the script is running as a different user than you are, and doesn't have command line permission to run your command. Check user permissions.

提交回复
热议问题