Execute MySQL statements during DAB fails

apmuthu

Renowned Member
Feb 26, 2009
871
11
83
Chennai - India & Singapore
github.com
Attempted to execute some SQL statements contained in a presql.mysql file as demonstrated in the Acquia template Makefile. It appears that there is no socket started for MySQL as yet and the following error message occurs:

Code:
cat presql.mysql|dab exec mysql -padmin
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ve_exec failed - status 1
ve_exec failed - status 1
make: *** [all] Error 1

The Makefile fragment is:
Code:
BASEDIR:=$(shell dab basedir)
all: info/init_ok
 dab bootstrap
 dab task mysql --password admin
 dab install apache2-mpm-prefork apache2
.
.
.
 cat presql.mysql|dab exec mysql -padmin
 dab exec a2enmod rewrite
 dab exec a2dissite default
 dab exec a2ensite eyeos
 dab finalize

# pveversion -v
pve-manager: 1.3-1 (pve-manager/1.3/4023)
qemu-server: 1.0-14
pve-kernel: 2.6.24-11
pve-kvm: 86-3
pve-firmware: 1
vncterm: 0.9-2
vzctl: 3.0.23-1pve3
vzdump: 1.1-2
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
 
Last edited:
Attempted to execute some SQL statements contained in a presql.mysql file as demonstrated in the Acquia template Makefile. It appears that there is no socket started for MySQL as yet and the following error message occurs:

Yes, dab does not start mysql daemon.