How to clear cache?

Discussion in 'MySQL' started by hitboy, May 13, 2007.

  1. #1
    I was wondering how do you clear database cache..?

    I have no idea what so ever so please fill me in hehe
     
    hitboy, May 13, 2007 IP
  2. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #2
    what kind of DB system you have? mysql/mssql other?
     
    gibex, May 14, 2007 IP
  3. hitboy

    hitboy Well-Known Member

    Messages:
    2,939
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    170
    #3
    mysql database system
     
    hitboy, May 14, 2007 IP
  4. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #4
    The RESET QUERY CACHE or FLUSH TABLES statement removes all query results from the query cache.
     
    wing, May 14, 2007 IP
  5. hitboy

    hitboy Well-Known Member

    Messages:
    2,939
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    170
    #5
    MySQL said: Documentation
    #1227 - Access denied; you need the RELOAD privilege for this operation

    im getting that messege how do i give myself premissions? its my server so i just need to know how to do thanks
     
    hitboy, May 14, 2007 IP
  6. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #6
    If it's your own server you should grant all permission to yourself.

    So, if your mysql username is "root" and your hostname is "localhost" you can run the query below to grant the user root all permissions.

    REVOKE ALL PRIVILEGES ON * . * FROM 'root'@'localhost';
    
    GRANT ALL PRIVILEGES ON * . * TO 'root'@ 'localhost' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;
    Code (markup):
     
    wing, May 15, 2007 IP
  7. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #7
    only as admin you can clear mysql cache
     
    gibex, May 15, 2007 IP
  8. hitboy

    hitboy Well-Known Member

    Messages:
    2,939
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    170
    #8
    where do i do that wing at the ssh command?
     
    hitboy, May 16, 2007 IP
  9. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #9
    Yes, either SSH or PhpMyAdmin or similar..

    From the manual at hxxp://dev.mysql.com/doc/refman/4.1/en/grant.html
    In short, to use GRANT to set priviliges you must be the rootusersuperbazookaadmin.
     
    wing, May 16, 2007 IP