centos: Another MySQL daemon already running with the same unix socket

To prevent the problem from occurring, you must perform a graceful shutdown of the server from the command line rather than powering off the server.

# shutdown -h now

This will stop the running services before powering down the machine.

Based on Centos, an additional method for getting it back up again when you run into this problem is to move mysql.sock:

# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service mysqld start

Restarting the service creates a new entry called mqsql.sock

GIT – Clone a project to different server/remote

Change git repository URL in your project. E.g. config file in your project .git folder (myproj/.git/config) will look like



[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://myuser@github.com/myuser/myproj.git
[branch "master"]
        remote = origin
        merge = refs/heads/master

Change project URL pointing to new server



[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://bitbucket.org/myuser/myproj.git
[branch "master"]
        remote = origin
        merge = refs/heads/master

Push the project


$ git push --all origin

GIT – Push a project to multiple repository

Add following lines in file “.git/config” inside your project folder



[remote "all"]
        url = https://myuser@github.com/myuser/myproj.git myproj
        pushurl = https://bitbucket.org/myuser/myproj.git
        pushurl = ssh://mygitserver/myproj.git        

Then push the changes to all the repository


$git push all --all