kNish wrote:
>  
>             I must admit I know more of python than SQL. When you say
> not with localhost as hostname. You are saying that given a computer A
> which is acting as a server, has a user name created as root and
> passwd "", When another computer B on the same network,
> domain (without a firewall) tries to connect to Computer A using the
> command
>  
> conn = MySQLdb.connect(host = "localhost",port = 3306, user =
> "root",passwd = "",db = "dailies",cursorclass=MySQLdb.cursors.DictCursor)
>  
> How else will it communicate to access the records on computer A from B.

"localhost" is a shortcut that always refers to the current computer. 
If you are on computer B, then "localhost" means computer B.  If you
want to talk to computer A, you have to specify the name of computer A.

This is exactly like trying to contact a web server.  If you want to
talk to the web server on the computer where you are sitting, you say
"http://localhost";.  But if you want to contact Google, it is clear that
you can't type "http://localhost";.  It's the same thing here.  You have
to tell MySQLdb the real name of the machine that is running the
database server.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to