PDA

View Full Version : MySQL 1044 error


bjseiler
09-24-2003, 06:27 AM
1044 - Access denied for user: 'nags_db@localhost' to database 'nags_db'

I moved this site from a server running freebsd with mysql 3.x to the DA freebsd machine. Pretty vanilla site, no complex mysql at all. I did a phpmyadmin export from the other server and then an SQL update via phpmyadmin on the DA server.

95% of the site works and I can update, delete, etc., all of the tables, except for one. I realize this probably is not a DA issue, but I am stumped because everywhere I looked on the internet about this error implied I would be having access problems to the whole database, not individual tables.

Anyway, any help would be appreciated.

DirectAdmin Support
09-24-2003, 02:34 PM
Did you add that user to the database yet?

to test if you did, from ssh, you can run:

mysql -unags_db -p
and enter the password. If you get in, then the user is added, if not, you have to add it through DirectAdmin.

John

bjseiler
09-24-2003, 02:48 PM
Yeah that works.

The entire site is database driven and 95% of it works. It just seems like changes to this one table kick out this error. The truly strange thing is that I can go into phpMyAdmin with the same user/password and manually update that table without an issues at all.

bjseiler
09-25-2003, 08:10 AM
I am wondering if this will be an issue for hosts. I don't fully understand the ramifications of it.

To use LOCK TABLES in MySQL 4.0.2 you need the global LOCK TABLES privilege and a SELECT privilege on the involved tables. In MySQL 3.23 you need to have SELECT, insert, DELETE and UPDATE privileges for the tables.

What I had to do is go into the root user in phpMyAdmin, go to priviledges, and then give the nags_db user Global LOCK TABLES priviledges. Now the system appears to be working just fine.

If anyone thinks this is a security issue, or if this was a really stupid thing to do, please let me know. It makes me wonder though how many web hosting clients use LOCK TABLES and if hosts will just grant that as a default or do it on a case by case basis??