Can't connect to MySQL server on localhost (10061)这个就属于下面要说的情况 启动服务 systemctl start mariadb.service systemctl enable mariadb.service systemctl stop mariadb.service 1.首先开启mysql权限 设置ROOT密码 mysqladmin -u root password '888888' mysql -u root -p use mysql…
CentOS7的默认防火墙为firewall,且默认是不打开的. systemctl start firewalld # 启动friewall systemctl status firewalld # 查看firewall启动情况 firewall-cmd --zone=public --add-port=3306/tcp --permanent # 开启3306端口 firewalld   # firewall-cmd --reload 重启 firewall-cmd --query-port…
[root@mysqld ~]# mysql -uroot -h 192.168.1.35 -p Enter password: ERROR 1130 (HY000): Host '192.168.1.66' is not allowed to connect to this MySQL server 下表可见3306端口没打开: [root@v01-svn-test-server online]# service iptables status Table: filter Chain INPU…
最近利用Apache Mina实现了一个http服务,发布到linux下发现无法访问,通过HttpClient来发送http请求时,报如下错误: Exception in thread "main" org.apache.http.conn.HttpHostConnectException: Connection to http://10.5.20.96:8011 refused    at org.apache.http.impl.conn.DefaultClientConnecti…
开启远程访问: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; 允许任何ip以root用户登录 flush privileges;立即生效 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.1.关闭firewall:systemctl stop firewalld.servicesystemctl disable firewalld.ser…
开启 MySQL 的远程登陆帐号有两大步: 1.确定服务器上的防火墙没有阻止 3306 端口. MySQL 默认的端口是 3306 ,需要确定防火墙没有阻止 3306 端口,否则远程是无法通过 3306 端口连接到 MySQL 的. 如果您在安装 MySQL 时指定了其他端口,请在防火墙中开启您指定的 MySQL 使用的端口号. 如果不知道怎样设置您的服务器上的防火墙,请向您的服务器管理员咨询. 2.增加允许远程连接 MySQL 用户并授权. 1)首先以 root 帐户登陆 MySQL 在 Wi…
防火墙层面:   /sbin/iptables -I INPUT -p tcp --dport 8011 -j ACCEPT #开启8011端口  /etc/rc.d/init.d/iptables save #保存配置  /etc/rc.d/init.d/iptables restart #重启服务  查看端口是否已经开放 /etc/init.d/iptables status   查看端口: netstat -pan|grep 2809…
防火墙层面:   /sbin/iptables -I INPUT -p tcp --dport 8011 -j ACCEPT #开启8011端口  /etc/rc.d/init.d/iptables save #保存配置  /etc/rc.d/init.d/iptables restart #重启服务  查看端口是否已经开放 /etc/init.d/iptables status   查看端口: netstat -pan|grep 2809   本博文来源于:https://www.cnblog…
远程登陆数据库的时候出现了下面出错信息 :ERROR 2003 ( HY000 ) : Can 't connect to MySQL server on ' xxx.xxx.xxx.xxx ',经过今天下午的反复纠结,关于MySql数据库无法远程连接的问题可以归结为以下几点:1). 没有授予相应的权限: 例如,你想root使用123456从任何主机连接到mysql服务器 mysql>GRANT ALL PRIVILEGES ON *.* TO ' root '@' % ' IDENTIFIED…
iptables是linux下的防火墙组件服务,相对于windows防火墙而言拥有更加强大的功能,此经验咗嚛以centos系统为例.关于iptables的一般常见操作,怎么来判断linux系统是否启用了iptables服务 检查iptables是否安装   1 Linux下的防火墙iptables一般是系统集成的组件,检查是否安装可以 通过 rpm -qa进行查询 2 如果没有安装改组件,可以通过yum install iptables进行安装(必须联网) END 检查linux防火墙是否开启…