Project

General

Profile

« Previous | Next » 

Revision 13184

lib/sh/db.sh: added mysql_ctl()

View differences:

trunk/lib/sh/db.sh
201 201
EOF
202 202
}
203 203

  
204
## backups
205

  
204 206
mysqldump() # usage: [schema=1 | data=1] [create_db=1] mysqldump db [table...]
205 207
{
206 208
	echo_func
......
237 239
	benign_error=1 mysql_root <<<"REVOKE GRANT OPTION   ON $table FROM '$user'@'%'" || true
238 240
}
239 241

  
242
## server admin
240 243

  
244
mysql_ctl() # usage: mysql_ctl {start|stop|restart|...}
245
{ echo_func; sudo service mysql "$@"; }
246

  
247

  
241 248
### PostgreSQL
242 249

  
243 250
alias use_pg='declare prefix=pg_; import_vars; unset prefix'

Also available in: Unified diff