Redian新闻
>
Cannot connect to the mysql server insid
avatar
Cannot connect to the mysql server insid# Database - 数据库
e*t
1
Hi, I have intalled MySQL on one of my computer and try to access it using
another machine inside the same LAN. Some info about the setup:
* The MySQL server's IP is 192.168.0.3 while the client machine is 192.168.0.6
* Both machine running WinXP Pro
* On the client machine, I am using PHPED's embedded MySQL support to try to
access the database on the server.
But it keeping telling me that I can not connect the server, and I have tried
the following things which didn't work:
* Add host address
avatar
c*t
2
Co-ask:
mysql is installed on FC2; tried to use DBI to access the db.
can't connect to it.
Is there any port needed be opened on FC2?

【在 e********t 的大作中提到】
: Hi, I have intalled MySQL on one of my computer and try to access it using
: another machine inside the same LAN. Some info about the setup:
: * The MySQL server's IP is 192.168.0.3 while the client machine is 192.168.0.6
: * Both machine running WinXP Pro
: * On the client machine, I am using PHPED's embedded MySQL support to try to
: access the database on the server.
: But it keeping telling me that I can not connect the server, and I have tried
: the following things which didn't work:
: * Add host address

avatar
c*t
3
Starting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2004-10-27 20:12 CDT
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1648 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
3306/tcp open mysql
my $dbh = DBI->connect("DBI:mysql:database=mydb;
host=192.168.0.10;port=3306",
"root", "",
{'RaiseError' => 1});

【在 c**t 的大作中提到】
: Co-ask:
: mysql is installed on FC2; tried to use DBI to access the db.
: can't connect to it.
: Is there any port needed be opened on FC2?

avatar
c*t
4
Host ... is not allowed to connect to this MySQL server
You can fix this by setting up an account for the combination of client
hostname and username that you are using when trying to connect. If you
don't know the IP number or hostname of the machine from which you are
connecting, you should put an entry with '%' as the Host column value in
the user table and restart mysqld with the --log option on the server
machine. After trying to connect from the client machine, the information in
the MySQL
avatar
c*t
5
Summary:
mysql> GRANT ALL PRIVILEGES ON *.* TO '[email protected]_pc_ip' IDENTIFIED BY
'password';
the you can use username, password to connect back from the client_pc.

【在 c**t 的大作中提到】
: Host ... is not allowed to connect to this MySQL server
: You can fix this by setting up an account for the combination of client
: hostname and username that you are using when trying to connect. If you
: don't know the IP number or hostname of the machine from which you are
: connecting, you should put an entry with '%' as the Host column value in
: the user table and restart mysqld with the --log option on the server
: machine. After trying to connect from the client machine, the information in
: the MySQL

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。