Personal Car Finance | Credit Cards | Loan | Internet Advertising | Home Loan
More MySQL errors [Archive] - ZGeek

PDA

View Full Version : More MySQL errors


Pirate
05-08-2005, 10:57 AM
Well my funning with Mysql continues. The IT guys here don't know how to fix it so Im fucked. Basically my problem is that I can't save any data into a database. I can create them, set up tables etc but I just can't get any data into the database from the web. But I can edit them manually.

I've checked the privilages and I'm dead sure this is the problem. I got them to run the fix from yesterdays problem (http://forums.zgeek.com/showthread.php?t=39185) but now this new one has turned up. I've done some searching but all the answers are ones I don't understand because I dunno mysql that well as I only ever used phpmyadmin. They've given me root access to fix the problem myself, but I got no fucking idea what to do.

This is the error I get when going to check the database's privilages in phpmyadmin. Users having access to "deftpayments"

Error

SQL-query :

(
SELECT `User` , `Host` , `Db` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Grant_priv` , `References_priv`
FROM `db`
WHERE "deftpayments"
LIKE `Db` AND NOT (
`Select_priv` = "N" AND `Insert_priv` = "N" AND `Update_priv` = "N" AND `Delete_priv` = "N" AND `Create_priv` = "N" AND `Drop_priv` = "N" AND `Grant_priv` = "N" AND `References_priv` = "N"
)
)
UNION (

SELECT `User` , `Host` , "*" AS "Db", `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Grant_priv` , `References_priv`
FROM `user`
WHERE NOT (
`Select_priv` = "N" AND `Insert_priv` = "N" AND `Update_priv` = "N" AND `Delete_priv` = "N" AND `Create_priv` = "N" AND `Drop_priv` = "N" AND `Grant_priv` = "N" AND `References_priv` = "N"
)
)
ORDER BY `User` ASC , `Host` ASC , `Db` ASC ;

MySQL said:

Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'UNION'

User Host Type Privileges Grant Action Can anyone point me in the right direction to fix this?

Directed
05-08-2005, 11:12 AM
Out of curiosity, what OS and what file system do you have running your mysql server? It sounds like a file rights problem to me. You can manually edit it as your rights are well established, but the web page app may not be able to? Just a thought.

Pirate
05-08-2005, 11:23 AM
I think its apache, thats all I know sorry.

Directed
05-08-2005, 12:08 PM
Although my knowledge in these areas is VERY weak, it sounds like a file-rights problem. Perhaps someone else will drop by and shed more light on it.

Pirate
05-08-2005, 12:26 PM
Thats what I think too. I wish they'd hire an IT guy that can actually fix servers next time.. this damn problem is holding up all my work. fucken.

Arcane1
05-08-2005, 12:34 PM
Does the _user_ that is logging into the web page have any rights? Clearly you do, when you log in to do manual edits, but there needs to be a user that has rights from the web side of the matter, or a group that consists of all registered users = write data permissions

jhop
05-08-2005, 12:36 PM
I would have thought that file permissions would stop you adding tables as well.

Can you run simpler queries?

do the abouve one as two without the union, that might be the issue.

Pirate
05-08-2005, 12:48 PM
Does the _user_ that is logging into the web page have any rights? Clearly you do, when you log in to do manual edits, but there needs to be a user that has rights from the web side of the matter, or a group that consists of all registered users = write data permissionsI can login as myself and as the root user, both have the same problems.

Its really weird that one database that we created at the begining works fine but any newly created ones don't. I can run queries and I can insert info into tables etc via phpmyadmin.

I've been looking more a the last line of the error. Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'UNION' and comparing it against this (http://www.vbulletin.com/forum/bugs.php?do=view&bugid=3624) . Could it be to do with the character set?

jhop
05-08-2005, 12:55 PM
yeah, that could be it. The error seems to sugest that you are trying to do a union of two things that arn't the same. If you can do the two queries seperatly, that would prove it. Then drop the columns one by one till you workout which one it is that is stuffing it up. Then look at the definitions of those columns, and make them the same. the COERCIBLE v's IMPLICIT thing looks like different types. My guess is that it is the Dd column

Pirate
05-08-2005, 01:00 PM
I wish I understood that. But I will sent it to the IT guy. I also see that a new version of phpmyadmin is out 2.6.3.. we have 2.5.0 maybe thats it :P... fucken I got no idea.

Pirate
05-08-2005, 03:20 PM
w00t the upgrade fixed that error.. found another one. But I give up.

Uther Pendragon
05-08-2005, 09:05 PM
3 cheers for mysql

what a piece of junk database, oh well I guess you don't have much choice running off vbulletin. I really hope people re-write their apps to use postgresql, mysql is a joke.

Directed
05-08-2005, 10:33 PM
I whole-heartedly support the dissing/public lynching of mysql, but only because every time I think I know something about that damn database it ends up I don't.

Uther Pendragon
06-08-2005, 12:13 AM
I don't like it because of:

1) No referential integrity unless you use non-default tables (wtf?)
2) No sub-selects on stable version
3) Triggers? Stored Procedures?

I mean seriously, what the hell kind of database hasn't got referential integrity? Even fucking access has ref integrity (even though it corrupts itself often).