安装完mysql后用root不能su成mysql
现象:
debian的机器用aptitude install mysql-server-5.1 后,用id mysql 可看出已经建了mysql用户,但是用root来su mysql 不成功,/var/log/auth.log显示:
Mar 2 22:23:15 mhxy-db08 su[26669]: pam_unix(su:session): session opened for user mysql by andrew(uid=0)
Mar 2 22:23:15 mhxy-db08 su[26669]: pam_unix(su:session): session closed for user mysql
解决:
修改/etc/passswd,将mysql的bash从false改为/bin/bash