[Zope] damn sophisticated mysql security

Gilles Lenfant glenfant@bigfoot.com
Fri, 4 Jan 2002 15:33:59 +0100


Hmmm.

IMHO, you should try to replace 5. and 6. against this SQL (as root):

grant all on mydatabase.* to myuser@localhost identified by 'mypassword';

Then carry on as usual with your ZMySQLDA object (use "mydatabase myuser
mypassword" as connection string).
This works perfectly for me.

HTH

--Gilles
----- Original Message -----
From: "Horst Wald" <horstwald@hotmail.com>
To: <zope@zope.org>; <website-talk-admin@list.ora.com>
Sent: Friday, January 04, 2002 1:32 PM
Subject: [Zope] damn sophisticated mysql security


> Hello,
>
> MySQL is so damn secure I can't access my own database!!!
>
> .. but only if I try to connect to the MySQL-Server on the same host like
> the Zope-server; I get:
>
> Error Type: OperationalError
> Error Value: (1045, "Access denied for user: 'hsql@localhost' (Using
> password: YES)")
>
> I can connect to a MySQL-Server on a remote machine without problems.
Let's
> see if I understood what you have to do if you want to connect to the
> Database "MyDataBase", being the user "MyUser" on the local machine with
the
> IP "195.196.197.198" using the password "MyPassWord":
>
> 1. become root
> 2. mysql
> 3. create database MyDataBase;
> 4. use mysql
> 5. insert into db values
>
('195.196.197.198','MyUser','MyPassWord','Y','Y','Y','Y','Y','Y','Y','Y','Y'
,'Y');
> 6. insert into user
>
values('195.196.197.198','MyUser',PASSWORD('MyPassWord'),'Y','Y','Y','Y','Y'
,'Y','Y','Y','Y','Y','Y','Y','Y','Y');
> 7. flush privileges; (or even restart MySQL or even reboot the computer)
>
> 8. then (in Zope) add a ZMySQLDatabaseConnection with the connection
string
> "MyDataBase MyUser MyPassWord", deliberately omitting the host
>
> Any easier way? The easiest way? What I'd like best would be to disable
the
> whole MySQL-security-stuff so I can start to work at last. I can care for
> security later.
>
> Thanks in advance
>
> Horst
>
>
> _________________________________________________________________
> Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden:
> http://messenger.msn.de
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>