createuser -s postgres createuser: error: could not connect to database template1: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket code example
Example: postgresql createdb
$ createdb -p 5000 -h eden -E LATIN1 -e demo
CREATE DATABASE demo ENCODING 'LATIN1';
/*createdb [connection-option...] [option...] [dbname] [description]*/