MySQL Question on Linux server

Discussion in 'Site & Server Administration' started by Lucky Bastard, Mar 28, 2005.

  1. #1
    Quick question:
    How can I execute MySQL queries on my server directly when I access Apache remotely via SSH? Currently I use phpmyadmin front-end interface and it works fine, but I want to be able to get see the query execution times (which I don't know if you can do on phpmyadmin when using the raw SQL box.) I

    Also how do I configure mysql server to allow query caching, I know these need to be configured but not sure how to go about doing it:
    have_query_cache
    query_cache_limit
    query_cache_size
    query_cache_type

    Thanks.
     
    Lucky Bastard, Mar 28, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    You can set MySQL variables globally by setting them in the /etc/my.cnf file (restart MySQL after). Also, phpmyadmin does show execution time.
     
    digitalpoint, Mar 28, 2005 IP
  3. Lucky Bastard

    Lucky Bastard Peon

    Messages:
    406
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks DP, can you explain using SSH (which I am a complete beginner with) how to modify the my.cnf to turn on query caching?
    ...and then how to restart mysql.

    Thanks!
     
    Lucky Bastard, Mar 28, 2005 IP
  4. Lucky Bastard

    Lucky Bastard Peon

    Messages:
    406
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So how does one modify the query cache?
    My my.cnf file only has about 5 lines it, no mention of query cache anywhere.

    Would love to hear other peoples experience on improvements (or lack of) from using this feature.
     
    Lucky Bastard, Mar 29, 2005 IP