[Zope] Z MySLQDA

C Africa cafrica@mac.com
Thu, 6 Jun 2002 17:09:31 -0700 (PDT)


Thanks to all for their help in getting my database connection back. It did turn out to be a privileges/access issue.

These are the steps I finally took

**Kill my mysql processes and start up mysql with --skip-grant-tables
**reset my root password & flush privileges
     %mysql -u root mysql
     %update user set password=password('newpassword') where user='root';
     %flush privileges

I did this for all of my user passwords.

Thanks again!

Chris




On Thursday, June 06, 2002, at 08:23PM, Aseem Mohanty <aseem@neurobehavioralsystems.com> wrote:

>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  
>================================================================== 
>
>
>
>
>
>_______________________________________________
>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 )
>
>