Thursday, April 17, 2014

ubuntu alias cd into directory

michaelz:~$ ls /home/git/repositories/serverConf/ibaobao/ conf etc mysql scripts usr michaelz:~$ alias cdibbs='cd /home/git/repositories/serverConf/ibaobao/' 
michaelz:~$ cdibbs
          michaelz:/home/git/repositories/serverConf/ibaobao$

Wednesday, April 9, 2014

mysqldump then mysql import: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

When a database has view or triggers that is backed with mysqldump using one user say userB, and later on to be imported using another user. The following error would show up.
Access denied; you need (at least one of) the SUPER privilege(s) for this operation
mysql -u userA < schema.sql ERROR 1227 (42000) at line 65: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
To fix the problem is that all the DEFINER=`userB` need to be changed to DEFINER=`userA`