Discussion:
How to GRANT myself privs?
(too old to reply)
pete
16 years ago
Permalink
Hi folks --

MySQL server is on my ISP. I want to GRANT myself privileges on my own
databases. In particular, I want to be able to CREATE/DROP DATABASE
from my C-language connector. I think I should be able to change my
privs, but MySQL refuses me:

mysql> use mysql
ERROR 1044 (42000): Access denied for user 'calls'@'localhost' to
database 'mysql'
mysql>

Do I have to ask the admin at my ISP to change my privs? Or what?

Thanks!

-- Pete
Gordon Burditt
16 years ago
Permalink
Post by pete
MySQL server is on my ISP.
I assume here it's a SHARED server, with other customer's data on
it as well as your own.
Post by pete
I want to GRANT myself privileges on my own
databases. In particular, I want to be able to CREATE/DROP DATABASE
from my C-language connector. I think I should be able to change my
mysql> use mysql
database 'mysql'
mysql>
Do I have to ask the admin at my ISP to change my privs? Or what?
Try the GRANT request, which does not require "use mysql" to work.
I suspect that you will not be able to grant yourself privileges
you don't already have. If you have multiple user accounts with
different privileges you might be able to grant privileges from one
user account to another. Or not. GRANTing privileges WITH GRANT
OPTION is something that is likely to cause the ISP to get more
tech support calls when users mess it up, so they will tend not to
allow it.

It is possible that your ISP is going to deny your request because
they use the lack of the ability to "CREATE DATABASE" to limit you
to a fixed number of databases that you get when you sign up for
the account. It may also permit you to create or delete databases
for other people, something which they can't allow.

Loading...