Archive
Posts in Databases
Debugging OpenLDAP ACLs
OpenLDAP provides a super powerful ACL syntax which allows you to control access to every nook and cranny of your directory server. When I'm testing advanced ACL configurations I have found it incredibly useful to add the "ACL" log option to the loglevel directive: When this option is set slapd will show you how it applies the ACLs to a given LDAP operation: This is super handy and will save you tons of time and heartburn when crafting complex ACLs.
$ read more →Using MySQL query logs to debug authentication issues
I recently installed LogAnalyzer, and after the install completed I noticed that nothing was being displayed in the web interface. I figured I fat fingered something, but needed a way to verify this. Luckily for me I was using MySQL, so I enabled MySQL query logging and low and behold I proved my hypothesis: To fix this I logged into the database and changed the password for the rsyslog user: Everything began working once the application could authenticate, and I was able to start playing around with LogAnalyzer. Noting this here in case I fat finger another password in the future…
$ read more →Enabling MySQL query logging
I recently installed the LogAnalyzer graphical syslog analysis tool. After the install completed I went to the "Show Events" page and noticed that no data was being displayed. I wanted to see which queries were being sent by LogAnalyzer to my MySQL database instance, so I enabled query logging by adding the following two statements to the [mysqld] block in the /etc/my.cnf configuration file: The first line enables logging, and the second line tells MySQL were to write the logs. Once enabled you can see the queries executed against your server by paging out the contents of /var/log/query.log…
$ read more →Using the rsyslog MySQL plug-in to send syslog data to a SQL database
I have been experimenting with ways to better manage the logs my servers generate. Depending on who you ask, folks will recommend sending your logs to a remote syslog server that writes the logs to disk, some may recommend sending it to a log analysis tool similar to splunk, and others would recommend feeding it to a SQL database. I've talked before about setting up syslog-ng for remote logging, and in this case I wanted to experiment with something new. I also didn't have money to buy a tool like splunk, so I decided to start experimenting with funneling syslog data into a MyQSL database…
$ read more →Display the default values of MySQL my.cnf settings
MySQL is configured through the my.cnf configuration file, which typically resides in /etc. There are dozens of configuration settings that can be added to this file, and you can view the full list by running mysqld with the "--help" and "--verbose" options: The configuration directive will be printed on the left, and the current value of the directive will be displayed on the right. When I get a "how do I do X" thought I typically will cross reference directives with the official documentation to see how to configure the server to do what I need it to. It's also just plain useful to know what you can do with the server.
$ read more →