Results 1 to 4 of 4

Thread: How to reload mysql configuration without restart mysqld daemon?

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default How to reload mysql configuration without restart mysqld daemon?

    Hi everybody

    I want to add slow_query log in mysql> terminal

    mysql> set GLOBAL slow_query_log=ON;
    mysql> show variables like '%slow%';
    mysql> show variables like '%slow%';
    +---------------------+--------------------------------+
    | Variable_name | Value |
    +---------------------+--------------------------------+
    | log_slow_queries | ON |
    | slow_launch_time | 2 |
    | slow_query_log | ON |
    | slow_query_log_file | /var/lib/mysql/ubungu-slow.log |
    +---------------------+--------------------------------+

    how can I affect that change without restart mysqld daemon

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,371
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    Try the following for all user related changes i.e. add /remove /modify privileges for your user
    Code:
    FLUSH PRIVILEGES;
    I want to add slow_query log in mysql> terminal
    how can I affect that change without restart mysqld daemon
    Those changes are instant. However, if you reboot the server or restart the mysql server, changes will be lost. So you need to edit the /etc/my.cnf. Add slow query related changes and reload the mysql server using service command. Example my.cnf:
    Code:
    log_slow_queries       = /var/log/mysql/mysql-slow.log
    long_query_time = 2
    Reload mysql:
    Code:
    service mysql reload
    The location of my.cnf and service name may change according to the Linux distro.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    thank you very much

  4. #4
    Junior Member
    Join Date
    May 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by phanmemseo View Post
    thank you very much
    Please Help with the tips to reload configuration file my.cnf without restarting the service.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. No data in mysqld.log or mysql-slow-query.log files
    By spik2kush in forum Databases servers
    Replies: 6
    Last Post: 8th August 2011, 10:15 PM
  2. [Solved] Restart mysql centos server
    By chinalinix in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 10th March 2010, 06:10 PM
  3. SSH: Restart Mysql Server
    By sweta in forum Getting started tutorials
    Replies: 1
    Last Post: 15th June 2008, 10:21 PM
  4. Replies: 1
    Last Post: 30th July 2007, 12:50 AM
  5. Automatically restart unix daemon
    By raj in forum Linux software
    Replies: 2
    Last Post: 16th December 2006, 11:29 AM

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41