Kiểm tra Network đã được bật hay chưa
netstat -tap | grep mysql
Bạn thấy hiện như vậy là Ok
[root@server1 ~]# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 2584/mysqld
[root@server1 ~]#
Nếu không bạn config
vi /etc/my.cnf
[...]
#skip-networking
[...]
Tạo username và password cho Mysql
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
Nếu bạn gặp thông báo lỗi kia hãy kiểm tra lại hostname đã đúng với IP hiện tại chưa ? sau đó bạn thử lại