数据库允许远程登录
连接数据库
[root@localhost ~]# mysql -uroot -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
数据库未启用,启用数据库
[root@localhost ~]# ss -tunlp
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 192.168.208.246%eth0:68 0.0.0.0:* users:(("NetworkManager",pid=947,fd=20))
udp UNCONN 0 0 127.0.0.1:323 0.0.0.0:* users:(("chronyd",pid=916,fd=6))
udp UNCONN 0 0 [::1]:323 [::]:* users:(("chronyd",pid=916,fd=7))
tcp LISTEN 0 128 127.0.0.1:45233 0.0.0.0:* users:(("node",pid=1900,fd=18))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=956,fd=5))
tcp LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=956,fd=7))
3306端