我有两个服务器名为server1和server2.both具有不同的静态IP地址。我想从server1访问server2数据库。两台服务器我已经安装了PHPmyadmin.In Server1操作系统是Ubuntu,在server2 fedora12中。我想连接一个服务器数据库到另一台服务器
我已经做了this..mysql错误13即将
在Server2上的my.cnf包含
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
# To allow mysqld to connect to a MySQL Cluster management daemon, uncomment
# these lines and adjust the connectstring as needed.
#ndbcluster
#ndb-connectstring="nodeid=4;host=localhost:1186"
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"
[ndb_mgm]
# connection string for MySQL Cluster management tool
connect-string="host=localhost:1186"
我觉得口是在MySQL的情况下,必须数据库如果没有错误! –
如果未指定,PHP会连接到默认端口(3306)。但你是对的:总是指定端口。 – HBv6