Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ Description: the password for the database user (above)
Type: `String`
Description: the hostname for the location in which the database resides. Typically this will be `localhost`

#### port
Type: `Integer`
Description: the port that MySQL is running on. Defaults to `3306`

#### url
Type: `String`
Description: the string to search and replace within the database before it is moved to the target location. Typically this is designed for use with systems such as WordPress where the `siteurl` value is [stored in the database](http://codex.wordpress.org/Changing_The_Site_URL) and is required to be updated upon migration to a new environment. It is however suitable for replacing any single value within the database before it is moved.
Expand Down
10 changes: 6 additions & 4 deletions tasks/deployments.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ module.exports = function(grunt) {
user: config.user,
pass: config.pass,
database: config.database,
path: src
path: src,
port: config.port || 3306
}
});

Expand Down Expand Up @@ -187,7 +188,8 @@ module.exports = function(grunt) {
user: config.user,
pass: config.pass,
database: config.database,
host: config.host
host: config.host,
port: config.port || 3306
}
});

Expand Down Expand Up @@ -249,9 +251,9 @@ module.exports = function(grunt) {

search_replace: "sed -i '' 's#<%= search %>#<%= replace %>#g' <%= path %>",

mysqldump: "mysqldump -h <%= host %> -u<%= user %> -p<%= pass %> <%= database %>",
mysqldump: "mysqldump -h <%= host %> -u<%= user %> -p<%= pass %> -P<%= port %> <%= database %>",

mysql: "mysql -h <%= host %> -u <%= user %> -p<%= pass %> <%= database %>",
mysql: "mysql -h <%= host %> -u <%= user %> -p<%= pass %> -P<%= port %> <%= database %>",

ssh: "ssh <%= host %>",
};
Expand Down