Access Denied For Mysqldump Command On Forge With Digitalocean
I'm running an artisan command that should backup my database, but I get this error:
mysqldump: Got error: 1045: Access denied for user 'forge'@'126.96.36.199' (using password: YES) when trying to connect
This is the command:
exec('mysqldump -u '.$user.' -h '.$host.' -pmysql-pass '.$password.' forge > storage/files/'.$fileSql);
It's using the right username and password so I really can't see where the problem is. On my local machine it worked perfect. Of course I configured all the environment variables properly.
Your parameter is wrong for the password, it should be:
exec('mysqldump -u '.$user.' -h '.$host.' --password='.$password.' forge > storage/files/'.$fileSql);
You may need to grant access using this:
GRANT ALL ON yourdb.* TO [email protected] IDENTIFIED by 'the-password-goes-here';
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?