Showing entries 11 to 16
« 10 Newer Entries
Displaying posts with tag: chris calender (reset)
Determining the MySQL Enterprise Monitor (MEM) Version from the Command Line

Surprisingly, obtaining the version of the MySQL Enterprise Monitor from the command line is not as obvious as one woud think. Generally, with most MySQL programs, you can use the –version option passed to the program to obtain this information (such as you can with the mysqld, the MEM agent, and MySQL proxy).

I realize this is not too common of a problem, but hopefully this will help someone out there.

There is a version.sh (Linux) and version.bat (Windows) included in /opt/mysql/enterprise/monitor/apache-tomcat/bin, which will output everything but the MEM version:

root@chris-linux:/opt/mysql/enterprise/monitor/apache-tomcat/bin# ./version.sh
Using CATALINA_BASE:   /opt/mysql/enterprise/monitor/apache-tomcat
Using CATALINA_HOME:   /opt/mysql/enterprise/monitor/apache-tomcat
Using CATALINA_TMPDIR: /opt/mysql/enterprise/monitor/apache-tomcat/temp
Using JRE_HOME:       /opt/mysql/enterprise/monitor/java
Server version: Apache …
[Read more]
Resolving the “Can’t create IP socket: No such file or directory” Error on Windows

Every now and again, when installing or upgrading MySQL on Windows, mysqld will not start, and it’s not due to any changes in the config file, using some old config option, permissions, something changed/removed, or anything else. It just simply fails, when you know it should work.

If you’re lucky, you’ll at least see the “Can’t create IP socket: No such file or directory” error in the error log.

However, the above error is generated when you invoke mysqld from the command line, and not via the service.

So if you’re not seeing any error on the console, or in the error log, when starting mysql via the service, then try it from the command line, so you can perhaps get more information in the error log.

The “Can’t create IP socket: No such file or directory” error is not very specific, nor is it helpful in determining the problem (especially since this in on Windows).

However, I’ve …

[Read more]
Syntax for Creating a Windows Service for MySQL (when there are 2 paths which both contain spaces)

Numerous times now, I’ve seen people have troubles creating MySQL services on Windows manually (using ‘sc’), whether it be for mysqld itself, MySQL Proxy, or the MySQL Enterprise Monitor and/or Agent.

The proper syntax for ‘sc’ can get tricky when you have spaces in pathnames, which is very common in Windows, and the need for –defaults-file (which means two paths each potentially containing spaces).

So, if you have spaces in both your binpath and your path to –defaults-file, then the following syntax will work for you (all on a single line):

sc create MySQLEnterpriseMonitorAgent 
binpath= ""C:Program FilesMySQLEnterpriseAgentbinmysql-monitor-agent.exe" 
--defaults-file="C:Program FilesMySQLEnterpriseAgentetcmysql-monitor-agent.ini"" 
DisplayName= "MySQL Enterprise Monitor Agent" start= "auto"

Note that you could easily use the exact same syntax to install a Windows service for the MySQL server itself …

[Read more]
Getting LuaSocket to Work with MySQL Proxy

I’ve seen some interest in trying to get LuaSocket working with MySQL Proxy, and most of those interested have run into issues getting this set up, so I want to provide a brief walk-through on how to get this set-up and working properly.

Note I tested this on Windows, so use .so instead of .dll on *nix systems.

1. Download LuaSocket (contains lua/ and lib/ directories)

2. Copy contents of ‘lua/’ into the following directory:

C:Program FilesMySQLmysql-proxy-0.8.0libmysql-proxylua

3. Copy contents of ‘lib/’ into the following directory:

C:Program FilesMySQLmysql-proxy-0.8.0bin

4. In step #3, you should have copied a ‘socket/’ and ‘mime/’ directories into bin/. Rename the directory named “socket” to “lua-socket”. This will get you past one set of errors.

5. Next, in the C:Program …

[Read more]
Using EXPLAIN EXTENDED / SHOW WARNINGS to Help Troubleshoot Inefficient Queries in MySQL

When examining the execution plan of troublesome queries in MySQL, most users are aware of using EXPLAIN. However, an often overlooked, yet very helpful extension of EXPLAIN, is EXPLAIN EXTENDED coupled with the SHOW WARNINGS command.

The reason being is because it provides a little more information about how the optimizer processes the query, and thus it could help to quickly identify a problem that you might not otherwise recognize with just EXPLAIN.

For instance, here is a common query which could be inefficient:

SELECT id FROM t WHERE id='1';

And here is the CREATE TABLE output:

mysql> show create table tG
*************************** 1. row …
[Read more]
Ease of Switching to the InnoDB Plugin and the Numerous Benefits

In my last post, I discussed how to troubleshoot InnoDB locks using the new InnoDB Plugin’s new Information Schema tables.

However, that got me to thinking about how many MySQL 5.1 users who have still not switched to use the plugin as opposed to the built-in version of InnoDB.

There are many advantages to using the plugin as opposed to the built-in version (aside from just the new I_S tables, and more importantly, numerous performance enhancements), and it’s breeze to set up, so I wanted to provide a quick start guide to using the new InnoDB plugin.

Note that the …

[Read more]
Showing entries 11 to 16
« 10 Newer Entries