I've got error message: Got error: 1045: "Access denied for user 'someone'@'::1' (using password: YES)"; when I want to make backup in Admin Page of my app.
FYI: I make database in local computer without password. I make database in remote server with password. How can I solve that problem? Many thanks for your help.
My regards,
Soewandi
Backup Errror at Admin Page
Re: Backup Errror at Admin Page
This error usually appears when MySQL tries to connect using IPv6 (which comes through as '::1') rather than the standard IPv4 localhost (127.0.0.1). MySQL distinguishes hosts based on literal IP addresses, so a user with privileges for 'localhost' might still be denied if the connection is recognized as '::1'.
Here are a few possible causes and how to fix them:
Here are a few possible causes and how to fix them:
- The MySQL user doesn’t have permissions for '::1'. Make sure you’ve granted the necessary privileges to 'someone'@'::1'. For example, you can run something like:
(Adjust privileges according to your security needs.)Code: Select all
GRANT ALL PRIVILEGES ON your_database.* TO 'someone'@'::1' IDENTIFIED BY 'strong-password'; FLUSH PRIVILEGES;
- The MySQL user is only defined for 'localhost' or some other host. If you see an entry for 'someone'@'localhost' in MySQL, but not for 'someone'@'::1', you might need to create it or modify it to ensure the user has the same privileges on '::1'.
- mysqldump command is connecting incorrectly. If your AppGini app triggers mysqldump without explicitly specifying IPv4, it might default to IPv6. One workaround: specify the host as 127.0.0.1 (IPv4) in your backup logic. For example:
Adjust the command to match your database details and file paths.Code: Select all
// within the backup script logic inside the admin area $cmd = "mysqldump -h 127.0.0.1 -u someone -p'your_password' your_database > backup.sql"; exec($cmd, $output, $return_var);

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: Backup Errror at Admin Page
Many thanks Ahmed for your fast response and explanation. I will try to resolve it.
Re: Backup Errror at Admin Page
Update: I success running Database Backup in my local computer (database without password), through edit or change pageBackupRestore.php in line 338 from:
<code>
$pass_param = ($config['dbPassword'] ? " -p{$config['dbPassword']}" : '');
</code>
to:
<code>
$pass_param = ((empty($config['dbPassword']) || $config['dbPassword']=='""') ? "" : "-p{$config['dbPassword']}" );
</code>
This is the feedback command after success backup in my local computer:
<code>
(mysqldump -y -e --no-autocommit -q --single-transaction -u"root" -P "3306" -h"localhost" "jemaatgkis" -r "C:/xampp/htdocs/jemaatgkis/admin/backups/d7ede62544bd773d3.sql") 2>&1
</code>
But the new edited file in remote server (hosting) did not success to backup as expected.
What is the problem?
<code>
$pass_param = ($config['dbPassword'] ? " -p{$config['dbPassword']}" : '');
</code>
to:
<code>
$pass_param = ((empty($config['dbPassword']) || $config['dbPassword']=='""') ? "" : "-p{$config['dbPassword']}" );
</code>
This is the feedback command after success backup in my local computer:
<code>
(mysqldump -y -e --no-autocommit -q --single-transaction -u"root" -P "3306" -h"localhost" "jemaatgkis" -r "C:/xampp/htdocs/jemaatgkis/admin/backups/d7ede62544bd773d3.sql") 2>&1
</code>
But the new edited file in remote server (hosting) did not success to backup as expected.
What is the problem?
Re: Backup Errror at Admin Page
You need to have mysqldump in your hosting server.
A good practice is to include its full path when calling it. Eg.: /usr/local/bin/mysqldump .....
A good practice is to include its full path when calling it. Eg.: /usr/local/bin/mysqldump .....