I'm following the well-known tutorial, and I'm at this step
However I've got a problem when trying to run
postmap -q example.org mysql:/etc/postfix/mysql-virtual-box-domains.cf
postmap: warning: connect to mysql server 127.0.0.1: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
However I am able to connect to mysqld via mysql:
mysql -u mailuser -p, with the password "foo". The .cf looks like this:
user = mailuser password = foo hosts = 127.0.0.1 dbname = mailserver query = SELECT 1 FROM virtual_domains WHERE name='%s'
What could be the problem?
The relevant part from my.cf looks like this:
# The MySQL server [mysqld] port = 3306 socket = /var/run/mysqld/mysqld.sock datadir = /var/lib/mysql skip-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 16K myisam_sort_buffer_size = 8M # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # #skip-networking bind-address = 127.0.0.1