Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misuse of shell builtins : mysqldump: Got error: 2004: "Can't create TCP/IP socket" #11

Open
maab16 opened this issue Jul 16, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@maab16
Copy link
Contributor

maab16 commented Jul 16, 2020

Sometimes you may face an issue that database backup and restore works fine on command line php artisan dbm:backup but not works in Artisan::call('dbm:backup'). It's happend because mysql dumper artisan command needs to call from localhost. Try this solution.

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.

Thanks

@maab16 maab16 changed the title Misuse of shell builtins : mysqldump: Got error: 2004: "Can't create TCP/IP socket" #632 Misuse of shell builtins : mysqldump: Got error: 2004: "Can't create TCP/IP socket" Jul 16, 2020
@Codexshaper Codexshaper added the documentation Improvements or additions to documentation label Jul 16, 2020
@Codexshaper Codexshaper pinned this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants