Starting backup...
Dumping database accounting...
Backup failed because The dump process failed with exitcode 2 : Misuse of shell builtins : mysqldump: Got error: 2004: "Can't create TCP/IP socket (10106 "Unknown error")" when trying to connect
got the following error line while trying to
Artisan::call('backup:run');
dd(Artisan::output());
using backup:run on the command line works well. calling it using laravel's Artisan gives that error.
It's probably something specific to your server setup. Make sure the php running your artisan has the right permissions to call mysqldump.
but it works from the command line just fine..
@freekmurze still same problem. tested with new projects. if it was a problem with the permissions it would not have worked using the command line
"php artisan backup:run" works just fine!
however calling it using the artisan call function results in
"Misuse of shell builtins : mysqldump: Got error: 2004: "Can't create TCP/IP socket (10106 "Unknown error")" when trying to connect" tried to give as many permissions to the php but it pointless as it is working if i just call it of the command line.
to mention it used to work just fine with version 3.11.0. now using ^5.2
Same heeeere!!
@freekmurze help please :(
Same.. anyone can help us?
I think @freekmurze is correct. Maybe there is something wrong with your server setup.
Maybe you are running your project outside htdocs (xampp) or www(wamp) or running php artisan:serve (127.0.0.1:8000).
Try localhost
OR
Try to setup like this in your apache virtual host. I'm using xampp in windows 10. Here is my setup
Step 1: Open your domain in your hosts file. In my case C:\Windows\System32\drivers\etc\hosts
Add below line in the end of file.
127.0.0.1 yourdomain.com
Save the file.
Step 2: Setup virtual host to link your domain with your project.
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot C:\xampp\htdocs\project-folder\public
SetEnv APPLICATION_ENV "development"
<Directory C:\xampp\htdocs\project-folder\public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Change 'yourdomain.com' to your original domain and 'project-folder' to your own project folder.
Restart your server. Done!
If you still face the same issue then reply with details OR use https://github.com/Codexshaper/database-backup-restore this package.
Thanks