I have the following situation:
I want to send data from one MySQL Server to another, the main server is here and the other is in another city, this is done via internet. This is very sensitive data.
What I did is a small PHP script that runs in the client (other city) that connects to the main server and sends all the data from his server to the main one.
The script connects to the main one using the parameter MYSQL_CLIENT_SSL, all worked fine when I ran the script from the prompt using #php (script).
Then I went on and made a cron job (as root) to automate this process (this is a daily process). Here's where the problem started. Whenever the script is run using the cron job (as whatever user even root) it gives me the following error in mysql_connect when connecting to the main server:
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Access denied for user: 'email@example.com
' to database '%T[' in /ServerScripts/SyncronizeDBToMTY.php4 on line 10
The name of the database changes whenever the script is executed. Seems like its getting corrupted somewhere. I tried running the script with the -n param without any luck.
Im desperate, can anyone help me.