Need someone to help me with MySQL real quick please :(

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Please please please :(

Im really stuck with a "GRANT" quiery in SQL :(

Im using phpMyAdmin and need someones help just for this 1 line of code i need to get right :(

Someone please help *Crys*

Thanks :(
Dan :(

Edit: My MSN account is: somefitbloke@hotmail.com - Please reply to this thread first if you think you can help then add me :(

Thanks again
 

WannaFly

Platinum Member
Jan 14, 2003
2,811
1
0
It would be a good idea to post it here so we can see what problem your having...Also is incase other people have that problem too.
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Originally posted by: WannaFly
It would be a good idea to post it here so we can see what problem your having...Also is incase other people have that problem too.

Genius ;) :p - You had me thinking someone had offered help :(

Im trying to create a supposed user in my db.

Basically this is the only instruction I have been given and as always with SQL instructions, its not exactly detailed.

* Create a Database USER.

$ mysql (My db name)
mysql > grant usage on (My db name).* to dbuser@localhost;
mysql > grant select,insert,delete,update on postaci.* to dbuser@localhost;
mysql > exit;
$ mysqladmin -u dbuser password "new password"

* make sure the password is the same as "new password" in the includes/global.inc file.

(Remembering that the My db name in brackets is just my database name)

Ok only thing is im running phpmyadmin. Now in phpmyadmin, it shouldnt be any different, I can still execute the same SQL commands from phpmyadmin right?

Everytime I try and execute the first part of the above command (grant usage on (My db name).* to dbuser@localhost[img]i/expressions/face-icon-small-wink.gif[/img] I get an access denied error :(

Am I doing this wrong? Im not entirely sure what im supposed to be putting?!

Any ideas? :(
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
USE mysql;
INSERT INTO user ('localhost', 'theusername', PASSWORD('thepassword'));
INSERT INTO db('%', 'thedatabase', 'theusername', 'Y', 'Y', 'Y', 'Y');
FLUSH PRIVILEGES;




i think that's how you'd do it manually. i always just use phpmyadmin to insert the appropriate entries and reload mysql
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Yeah you see the thing is my database is hosted with my host (Oneandone)

Thats why am using phpmyadmin, because I cannot physically get to the machine, its locked away in some "Safe to nuclear standards" datacentre with 5 billion alarms, a pressure sensitive floor, laser's n all.

Anyway that went a bit OT, but ill try that and see what it will do.

What does flushing tables actually do? Will I lose any data in the database? I have a lot of stuff in other table you see.

Dan
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If you can connect to MySQL via the Internet you can use the mysql command-line tool from any machine.
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
Do you own the MySQL server? Or is it a shared one? If the latter, I don't think you are given the privileges to add a new user to the database.
 

eklass

Golden Member
Mar 19, 2001
1,218
0
0
oh.. if it's on a host in which you don't have that kind of control, thn you simply need to ask your provider to add the user :)
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
if you're getting access denied, you simply don't havethe proper privileges. You need to be logged into MySQL as root or some other privileged user.
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Originally posted by: ergeorge
if you're getting access denied, you simply don't havethe proper privileges. You need to be logged into MySQL as root or some other privileged user.

The MySQL database is soley mine, through my hosting company.

I have full admin rights of my database - or so I thought :(

I dont know what the problem is at all :(
 

awal

Senior member
Oct 13, 1999
953
0
0
Originally posted by: Nothinman
If you can connect to MySQL via the Internet you can use the mysql command-line tool from any machine.

this statement is incorrect...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
But as we saw from slammer or whatever it was called, not everyone feels that way.
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
Originally posted by: DannyBoy
Originally posted by: ergeorge
if you're getting access denied, you simply don't havethe proper privileges. You need to be logged into MySQL as root or some other privileged user.

The MySQL database is soley mine, through my hosting company.

I have full admin rights of my database - or so I thought :(

I dont know what the problem is at all :(

Let me get this right. Are you the SOLE owner (whether it is leasing/renting) of the machine running the MySQL server? If that's the case, how much are you paying monthly? There's a difference between having full admin rights to your database and full admin rights to the MySQL server.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
What does flushing tables actually do? Will I lose any data in the database? I have a lot of stuff in other table you see.
Actually he said flush privilages but in either case it's pretty much the same. You dont loose the data but it causes it to "reload" the data, since the users are basically another database on the server it has to flush the privilages from the db (load the new data into memory) before those settings take effect.

So if after creating a new user and giving them privilages you are getting permission errors (and you are sure you entered everything correct) it probably means that privilages didnt get flushed.

BTW if you have access to administrate it with PHPMyAdmin why dont you just create users and setup their privilages from there?

-Spy
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Originally posted by: kt
Originally posted by: DannyBoy
Originally posted by: ergeorge
if you're getting access denied, you simply don't havethe proper privileges. You need to be logged into MySQL as root or some other privileged user.

The MySQL database is soley mine, through my hosting company.

I have full admin rights of my database - or so I thought :(

I dont know what the problem is at all :(

Let me get this right. Are you the SOLE owner (whether it is leasing/renting) of the machine running the MySQL server? If that's the case, how much are you paying monthly? There's a difference between having full admin rights to your database and full admin rights to the MySQL server.

Oops, my bad :eek:

Im the sole owner of the db :eek:


Update though, ive sorted the problem and have everything working now :D

Thanks for your help guys :)

Dan
 

DannyBoy

Diamond Member
Nov 27, 2002
8,820
2
81
www.danj.me
Originally posted by: ergeorge
So what was the problem??

Instead of logging on with a user account, I didnt realise that the webmail script I configured was authenticating directly from the mail servers accounts.

For instance I was trying to logon with username dan and my password.

What the script was wanting was the e-mail address and pw of the mailbox account on the pop3 server.

You get that :confused:

You can checkout the webmail interface when ive finished it :)