MySql Grant Problems

Associate
Joined
17 Dec 2005
Posts
3
Location
Southampton
Hi all

Will just point out before I start, that my knowledge of mysql is limited to w3schools tutorials (i.e. select, update, insert etc) so any help will be grateful

Have been struggling with this problem since saturday.

Basically I need two mysql databases with a common user who has create, drop, insert (and so on) privileges. As I developed my code on my own PC where all databases (created through phpmyadmin) had identical user details when they were created I did not foresee this as a problem.

After buying a hosting package from QIQ I uploaded the code and created my databases through their custom control panel. However each database has one user (which matches the database name) when you create them. Each database appears to have its own separate install / access of phpmyadmin, so its not possible to enter other databases without going back to the main control panel.

However, as there was also an option to "Add a Stand-alone MySQL User" I assumed this would work fine. The description of the feature was:

You can use this form if you want to set up an extra user and set up its permissions manually (via phpMyAdmin for the database you want to grant privileges on).

After creating a user (name, password) I logged back into phpmyadmin and there was no privileges tab (what I was expecting after having a look at my own install). Unsure how to proceed I submitted a support ticket asking how I was meant to set up the permissions. I got a reply with a link to the GRANT area of the mysql documentation (GRANT documentation). After trying to puzzle my way through this (with various syntax errors and a couple more support tickets, telling me that GRANT ALL was not allowed), I ended up with this query (for select in this case)

Code:
GRANT SELECT ON `dbname`.* TO 'username'@'localhost' IDENTIFIED BY 'password'

This returned the error:

#1410 - You are not allowed to create a user with GRANT

Even though the username already exists (and password is correct).

The best QIQ could offer is:

The error message means what it says: you are not allowed to create a user (which is what you're telling it to do even if that's not your intention).

Unfortunately, despite the fact that we'd like to help, guiding you on how to use MySQL is beyond the scope of our support, because it is an advanced user feature.

I presume there's a method of using the GRANT command that doesn't try to create a new user, but I read the documentation until I went cross-eyed and couldn't see it.

If anyone could help I'd be very grateful

Thanks
 
Back
Top Bottom