If you're talking about /lib/msf/core/exploit/mysql.rb, I didn't end up using it  for two reasons, despite trying:

- It takes connection data from datastores named the same as the Tcp mixin
- It does not allow me to specify the socket used(I need to use nil in this case, from what I can tell)

Though I may be entirely wrong. But when I looked at how other exploits did it, it was the implementation in Exploit::Remote::MYSQL, which I couldn't make work for me unfortunately.