cruex
36
16
Forge

save() use wrong DB_HOST but the correct DB_USER

Posted 4 months ago by cruex

Hello,

I have a weird bug and I can't find a solution to it, namely:

I host my website with the Forge Service, my database is on an external server, now to my problem.

I'm trying with a "post" function to change a value in the database to verify an email, the values it can read out problem without error, but as soon as I get a value like

$verify->email_verified = 1;
$verify->save();

as an example, he takes the IP address of the web server and tries to connect to it, only now the problem my database is on an external server. This also works and you can read or enter values (with create etc.), only with this save() and update(); value edits it wrong.

ERROR:

Illuminate/Database/QueryException with message 'SQLSTATE[42000]: Syntax error or access violation: 1142 UPDATE command denied to user 'database_user'@'WRONGSERVERIP' for table 'table_name' (SQL: update `table_name` set `email_verified` = 1, `updated_at` = 2018-10-11 21:28:06 where `id` = 2)'

I hope someone can help me.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.