Fix lỗi của MySQL
“Using unique option prefix pass instead of password is deprecated”
Bài viết này sẽ chỉ các bạn fix một lỗi thông báo đơn giản của dịch vụ MySQL xuất ra.
Nhiều khi bạn chạy lệnh mysql hay mysqladmin, hoặc các script backup database thì bạn gặp phải một thông báo lỗi như sau :
# /bin/sh /home/cuongquach/scripts/db_demo.sh Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead ..
# mysqladmin ping Warning: Using unique option prefix pass instead of password is deprecated and will be removed in a future release. Please use the full name instead. mysqld is alive
Với thông báo này là do cấ hình trong file ~/.my.cnf hoặc file nào được bạn chỉ định về thông tin user/password đăng nhập có cú pháp không được tốt, chứ không hẳn sai.
Ở đây trường hợp của ta là do ta cấu hình cụm từ “pass” không được phù hợp theo lời chỉ dẫn thông báo, nên nhiệm vụ của bạn là đổi từ “pass” thành từ “password“.
# cat ~/.my.cnf [client] user="root" pass="xxxxxxxx"
Bạn sẽ đổi lại “pass” thành “password“.
# vi ~/.my.cnf [client] user="root" password="xxxxxxxx"
Như vậy là bạn đã fix được thông báo lỗi trên.