Page 1 of 2 12 LastLast
Results 1 to 16 of 24

Thread: mySQL question

  1. #1
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection

    mySQL question

    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?

  2. #2
    Flak Monkey! Dorza's Avatar
    Join Date
    Jul 2003
    Location
    UK - South Wales
    Posts
    1,762
    Thanks
    34
    Thanked
    17 times in 15 posts
    • Dorza's system
      • Motherboard:
      • Asus P5B Deluxe - WiFi
      • CPU:
      • Q6600 @ 3.06Ghz
      • Memory:
      • 2GB Crucial
      • Storage:
      • 500GB Samsung SpinPoint
      • Graphics card(s):
      • Geforce 9600GT
      • PSU:
      • Cosair HX520W
      • Case:
      • LianLi something something or other
      • Monitor(s):
      • Eizo FlexScan S1910 (1280*1024)
      • Internet:
      • 2mb Virgin (when they want to give me that: else 1mb)
    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.

  3. #3
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection


    It doesn't seem to be on my one?

  4. #4
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    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.....


  5. #5
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Quote Originally Posted by ikonia View Post
    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'.....
    Cheers for that, I ran

    grant all privileges on database.web78-admin-3 to 'web78-admin-3'@'localhost' identified by '**********'
    but got the following error

    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
    any ideas?

  6. #6
    Bigger than Jesus Norky's Avatar
    Join Date
    Feb 2005
    Posts
    1,579
    Thanks
    1
    Thanked
    8 times in 8 posts
    Does your server have cPanel?

  7. #7
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Quote Originally Posted by Norky View Post
    Does your server have cPanel?
    Nope, thats what i'm used to using but my new host QIQ use another type of menu system

  8. #8
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    Sorry Nick - I didn't explain clearly

    The syntax is....
    Code:
    GRANT ALL PRIVILEGES ON $database_name.* TO '$user'@'$host'
      IDENTIFIED BY '$password'
    So - an example would be

    Code:
    GRANT ALL PRIVILEGES ON prod_hexus.* TO 'hexus_dba'@'localhost'
      IDENTIFIED BY 'overclockers_rule'
    </sarcasm>
    It is Inevitable.....


  9. #9
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Thanks for that, I ran what you said

    GRANT ALL PRIVILEGES ON web78-admin-3 * TO 'web78-admin-3'@'localhost'
    IDENTIFIED BY 'heartfield'
    but still got the following error.

    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
    And chance you could take a look for me?

  10. #10
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    It's all in the manual at length.

    Missing a dot or semicolon perhaps?

    Code:
    grant all privileges on mydbase.*
    to someone@localhost
    identified by 'password';
    You can allow them to connect from anywhere by using
    Code:
    '%'
    in the hostname.
    To err is human. To really foul things up ... you need a computer.

  11. #11
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    yup, you've not quite got the syntax spot on.

    your statment is
    Code:
    GRANT ALL PRIVILEGES ON web78 - admin -3 * TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield'
    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.

    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.....


  12. #12
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Okay I just entered this into the SQL query box

    GRANT ALL PRIVILEGES ON web78-admin-3.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield' ;
    Still getting the following 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
    What am I doing wrong?

  13. #13
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    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.....


  14. #14
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Just entered this

    GRANT ALL PRIVILEGES ON 'web78-admin-3'.* TO 'web78-admin-3'@'localhost' IDENTIFIED BY 'heartfield';
    and got

    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
    Does anyone mind dipping into the system to fix it for me?

  15. #15
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    nick, are you leaving a space between the . and * as you shouldn't
    It is Inevitable.....


  16. #16
    Civilian Nick F's Avatar
    Join Date
    May 2004
    Location
    London
    Posts
    4,668
    Thanks
    9
    Thanked
    18 times in 10 posts
    • Nick F's system
      • CPU:
      • 2.4Ghz C2D
      • Memory:
      • 4GB
      • Storage:
      • 320Gb internal / 750Gb external
      • Case:
      • Apple iMac
      • Operating System:
      • Mac OSx
      • Monitor(s):
      • 24inch
      • Internet:
      • 8mb BE connection
    Nope not leaving any space.

    SQL is really starting to annoy me now

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 21-10-2005, 08:50 AM
  2. Making PHP and MySQL Talk?
    By Dav0s in forum Software
    Replies: 4
    Last Post: 18-09-2005, 10:53 PM
  3. mySQL problems
    By Vini in forum Software
    Replies: 2
    Last Post: 22-08-2005, 01:01 PM
  4. The 78th Annual Hexus Quiz!
    By Stewart in forum General Discussion
    Replies: 19
    Last Post: 23-01-2005, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •