I have a database created in mySQL but I need to add user permissions to it for it to work, but I can't find the option at all under phpMyAdmin.
Any ideas?
I have a database created in mySQL but I need to add user permissions to it for it to work, but I can't find the option at all under phpMyAdmin.
Any ideas?
I take it you want to add users and then add permissions to those users?
If so click on privileges on the PhpMyAdmin home page, its the 4th link from bottom on the left with my version. The rest should be self explanatory.
Last edited by Dorza; 18-11-2006 at 10:37 PM.
It doesn't seem to be on my one?
just run from the mysql command prompt
grant all privileges on database.* to 'user'@'host' identified by 'password'
or change all privileges to more restricive, eg: create,alter,drop to 'user'.....
It is Inevitable.....
Cheers for that, I ran
but got the following errorgrant all privileges on database.web78-admin-3 to 'web78-admin-3'@'localhost' identified by '**********'
any ideas?SQL query:
GRANT ALL PRIVILEGES ON database.web78 - admin -3TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-admin-3 to 'web78-admin-3'@'localhost' identified by '***********'' at line 1
Does your server have cPanel?
Sorry Nick - I didn't explain clearly
The syntax is....
So - an example would beCode:GRANT ALL PRIVILEGES ON $database_name.* TO '$user'@'$host' IDENTIFIED BY '$password'
</sarcasm>Code:GRANT ALL PRIVILEGES ON prod_hexus.* TO 'hexus_dba'@'localhost' IDENTIFIED BY 'overclockers_rule'
It is Inevitable.....
Thanks for that, I ran what you said
but still got the following error.GRANT ALL PRIVILEGES ON web78-admin-3 * TO 'web78-admin-3'@'localhost'
IDENTIFIED BY 'heartfield'
And chance you could take a look for me?Error
SQL query:
GRANT ALL PRIVILEGES ON web78 - admin -3 * TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-admin-3 * TO 'web78-admin-3'@'localhost'
IDENTIFIED BY 'heartfield'' at line 1
It's all in the manual at length.
Missing a dot or semicolon perhaps?
You can allow them to connect from anywhere by usingCode:grant all privileges on mydbase.* to someone@localhost identified by 'password';in the hostname.Code:'%'
To err is human. To really foul things up ... you need a computer.
yup, you've not quite got the syntax spot on.
your statment is
How it should be (double check this against the example I sent to see what I mean)Code:GRANT ALL PRIVILEGES ON web78 - admin -3 * TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'
don't for get the ; to execute the query but it looks like you know that already.Code:GRANT ALL PRIVILEGES ON web78-admin-3.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'
and as yamangman rightly pointed out you can specify all host with @'%'
however be aware you won't be able to connect with just a '%' host - you do need a localhost account and really consider the security risks of putting in a '%' variable, most web based applications will only ever need localhost.
It is Inevitable.....
Okay I just entered this into the SQL query box
Still getting the following error.GRANT ALL PRIVILEGES ON web78-admin-3.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield' ;
What am I doing wrong?SQL query:
GRANT ALL PRIVILEGES ON web78 - admin - 3. * TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield';
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-admin-3.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'' at line 1
can you show us the output of "show databases"
it looks like its sepereating the database name from web78-admin-3 to web78 - admin - 3
if you've not already - try quoting the database name so 'web78-admin-3'.*
It is Inevitable.....
Just entered this
and gotGRANT ALL PRIVILEGES ON 'web78-admin-3'.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield';
Does anyone mind dipping into the system to fix it for me?SQL query:
GRANT ALL PRIVILEGES ON 'web78-admin-3' . * TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield';
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''web78-admin-3'.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'' at line 1
nick, are you leaving a space between the . and * as you shouldn't
It is Inevitable.....
Nope not leaving any space.
SQL is really starting to annoy me now![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
SCAN.care@HEXUS