[Zope] Z MySLQDA

Aseem Mohanty aseem@neurobehavioralsystems.com
Thu, 06 Jun 2002 01:22:17 -0700


MySQL is very finicky about the connection string. In :

Database connection String:  database myname mypassword

You have to be careful about the 'database'. Sometimes localhost creates 
problems. Try using the valid IP or hostname address specified in the 
my.ini or my.cnf file instead of 'db@localhost' or just 'dbname'.

Also make sure that the user 'myname' that you are using is specified 
with the right hostname since you are using X. So in the mysql/mysql db 
check the users table and there should be a record that should have 
'myname' AND the 'hostname' is set to 'localhost' or '%'. If there is 
none (highly unlikely) you might want to copy one of the records and 
change the hostname to the IP or hostname of the machine.

hth.
AM

Chris Africa wrote:

>(Running Zope 2.5.1, Macintosh OS X v10.1.4, MySQL 3.23.49)
>
>Last week I set up Zope/MySQL, and I was able to connect to a MySQL database
>using ZMySQLDA. After I restarted my server, Zope & mysqld, I could no
>longer connect. 
>
>First, I tried to reconnect to the database (a connection was in place, I
>just hit the "connect" button), but I got an error message. So I deleted
>that database connection altogether and tried to create a new one, but I
>can't.
>
>When I try to "Add Z MySQL Database Connection," here are the options I use:
>
>Id: MySQL_database_connection
>Title: Z MySQL Database Connection
>Database connection String:  database myname mypassword
>
>This is the error I get
>
>Error Type: OperationalError
>Error Value: (1045, "Access denied for user: 'myname@localhost' (Using
>password: YES)")
>
>It doesn't matter which user I use, I always get this error. It also doesn't
>matter which database I'm trying to connect to.
>
>I know MySQL is running and the databases in question are working fine
>because I can connect to them and make changes with phpMyAdmin, and I can
>connect & edit them directly from the command line. I've tried all of my
>usernames and passwords, I've even reset them with phpMyAdmin, just to be
>sure. 
>
>Help! Any hints??
>

-- 
==================================================================
 Aseem Mohanty							   
 Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 
 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231		  	
==================================================================								  	
 "I saw `cout' being shifted "Hello world" times to the left and  
  stopped right there!!"                        -- Steve Gonedes  
==================================================================