Thursday, July 30, 2015

connecting to sql server with rails

sql server / sql express is by default cannot be connected by a fixed port
to login to sql server, first, assign a password for sa user,
or any user, and map the database to the user.
you may use db_owner for default role mapping.

then open sql configuration manager
select sql server netwrok configuration > Protocols for localhost / express / your instance name
select TCP/IP
scroll to bottom, and set:
all ports: 1433
dynamic port: (empty, not even a zero)
then goto control panel > services > sql server
restart service,
enable sql browser (auto start delayed) and start service

this shall help to make it work with rails or tiny_tds

Monday, July 20, 2015

mariadb 10.0 upgrade from 5.5

Upgrading to Mariadb10 seems to fail on my ubuntu 14 virtualbox.
What i did was restart the instance,
followed instruction from:
https://mariadb.com/kb/en/mariadb/upgrading-from-mariadb-55-to-mariadb-100/

and prompt to replace my my.inf configuration with maintainer configuration.
but it still failed.
tail -n 200 /var/log/syslog turn out that it was unable to bind at 127.0.0.1.

so i vi /etc/mysql/my.inf
change the binding address to 0.0.0.0

and it works :)


Tuesday, July 7, 2015

exim smarthost matching null or empty string via wildlsearch

okay, it took me a long time to finally figure how to match possible null / empty string
due to nature that sender_address_domain may be empty if its a bounce mail,
delimiting it in a string did not work, turn out ive to just create a blank {}

client_send = : ${extract{auth_name}{${lookup{${if eq{$sender_address_domain}{}{'default'}{$sender_address_domain}}}nwildlsearch{/etc/smart}{$value}fail}}} : ${extract{auth_pass}{${lookup{${if eq{$sender_address_domain}{}{'default'}{$sender_address_domain}}}nwildlsearch{/etc/smart}{$value}fail}}}

with this, it matches in /etc/smart:

default: auth_name=... auth_pass=...


notice the {} empty without any string inside


other complaints:
- for some weird reason, strlen function wont work in section: auth...