Can't connect to MySQL server on '' (10060)
远程连接服务器出现以上错误
主要有三个原因:
1、mysql授权表里没有远程机器的权限,及需要在授权表mysql.user添加
grant all privileges on *.* to 'root'@'远程登陆IP' identified by '远程登陆密码'
flush privileges;
2、网络不通,这个就不说了。
3、防火墙禁止3306端口,以iptable为例
vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306-j ACCEPT
service iptables restart
ps: iptables设置
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
相关文档:
If you set it in the cnf(it may be my.ini file) you will likely need to restart the server. Optionally, that is a dynamic variable and can be SET GLOBAL or SET SESSION from the command line as well.So just do as follows.
mysql>show variables like’max_allowed_packet’;
......
在linux下面安装mysql,首相要根据操作系统的版本,选择对应的mysql的版本,官方网站上有非常明确的分类
http://dev.mysql.com/downloads/
在这里我实验的操作系统是redhat linux
mysql 用了两个安装包,一个是server端,一个是client,我用的是rpm包,安装的指令比较简单。
MySQL-server-community-5.1.42-0.rhel4.i38 ......
查询语句:
SELECT 字段名 from 表名.
排序 order by 要排序的字段名 desc :以倒序查询.
limit 从第几个开始 查找多少个 :查找指定个数.
同时查询多个字段用","隔开.
如查询表里面的所有数据在字段名处填"*".
如只想显示某字段的前几位字符可以使用LEFT函数.
SELECT 字段名,LEFT(字段名,位数),字段名 from 表名.
COU ......
[转 mysql安全设置]
使用MySQL,安全问题不能不注意。以下是MySQL提示的23个注意事项:
1.如果客户端和服务器端的连接需要跨越并通过不可信任的网络,那么就需要使用SSH隧道来加密该连接的通信。
2.用set password语句来修改用户的密码,三个步骤,先“mysql -u root”登陆数据库系统,然后“my ......
NDBCLUSTER
(also known as NDB
) is an in-memory
storage engine offering high-availability and data-persistence
features.
The NDBCLUSTER
storage engine can be
configured with a range of failover and load-balancing options,
but it is easiest t ......