Results 1 to 3 of 3

Howto review MySQL queries used in scripts.

This is a discussion on Howto review MySQL queries used in scripts. within the General Discussion forums, part of the vBSEO SEO Plugin category; Introduction Due to a recent discussion about the morality of content of vBSEO customers and the encryption of php source ...

  1. #1
    xb_
    xb_ is offline
    Junior Member
    Join Date
    Jul 2005
    Posts
    27
    Liked
    0 times

    Lightbulb Howto review MySQL queries used in scripts.

    Introduction
    Due to a recent discussion about the morality of content of vBSEO customers and the encryption of php source code, someone asked me to elaborate on how to review MySQL queries being executed in scripts.

    Plain text logging
    To be able to do so, you will need to have access to the configuration file of the MySQL server where your database resides on. I have not tested it on the 5.0 version of this software, but in the 4.* series this is possible. According to my default configuration file, this feature also will be depricated in version 5.0.

    Let me quote a part of the my.cnf file we are using for our server.
    Quote Originally Posted by my.cnf
    [mysqld]
    skip-innodb
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    log-error = /var/log/mysql/mysqld.err
    # If set, mysql logs all queries(general query log). This will be deprecated in
    # 5.0. This logs all queries, even error queries and is slow.
    #log = /var/log/mysql/mysqld-queries.log
    #
    # If you really need logging, use rather binary logging. Especially when doing
    # replication. Read
    # file:/usr/share/doc/mysql-*/manual.html.gz#Replication
    As you can see here, it only required to uncomment the "log" setting, modifying the appropriate path to the logfile and a restart to enable logging.
    Logging of queries is a server intensive process, so it really is only recommended for debugging purpose.

    For more information on the subject, these documents i can recommend:


    References

    Regards,
    xb_

  2. #2
    vBSEO Staff Juan Muriente's Avatar
    Real Name
    Juan Carlos Muriente
    Join Date
    Jun 2005
    Location
    Puerto Rico
    Posts
    14,266
    Liked
    586 times
    Thank-you for posting this information xb_. It will definitely help to demonstrate that there is absolutely no security risk with vBSEO.

    /* Note: As xb_ mentioned, logging SQL queries is an intensive process. Remember to disable it once you have completed your log analysis. */

    Juan

  3. #3
    Senior Member
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    212
    Liked
    0 times
    Good post, the query logging capability of MySQL is very useful. Not just for analysis, but also for incorporation into a backup regimen.

Similar Threads

  1. VBSEO crashing new server
    By MentaL in forum Troubleshooting
    Replies: 20
    Last Post: 12-11-2005, 06:55 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
  •