MySQL 1044 error

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
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

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,021
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

Verified User
Joined
Jun 19, 2003
Messages
197
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

Verified User
Joined
Jun 19, 2003
Messages
197
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??
 
Top