Friday, June 03, 2016

transfer/copy database with SSH with only one command line

You can migrate a database using a single command line:

mysqldump –add-drop-table –extended-insert –force –log-error=error.log -uUSER -pPASS OLD_DB_NAME | ssh -C user@newhost "mysql -uUSER -pPASS NEW_DB_NAME"

man: can't set the locale; make sure $LC_* and $LANG are correct

I keep getting this error:
man: can't set the locale; make sure $LC_* and $LANG are correct

I tried locale-gen and many other things, without success.
The only thing that fixed it is: export LC_ALL=en_US.UTF-8 (which of course can be added in .profile to be permanent)