Hi Markus,

I've been trying lately to use the test_dbi thing with MySQL. The thing
is that I am trying to avoid using networking, as this could be very
problematic when dealing with a build machine or an environment that
might not even have a loopback setup. In that case, we have to use a
socket file, which is just fine. But the issue is that I don't want to
use the standard (eg: mysql client default) path for the socket file, I
want to use the path of the temp folder that I have setup. Let me
explain with the test script in mind:

MYTEMP_DIR=`mktemp -d`
ME=`whoami`

# --force is needed because buildd's can't resolve their
# own hostnames to ips
mysql_install_db --no-defaults --datadir=${MYTEMP_DIR} \
        --force --skip-name-resolve --user=${ME} \
        /usr/sbin/mysqld --no-defaults --skip-grant \
        --user=${ME} --socket=${MYTEMP_DIR}/mysql.sock \
        --datadir=${MYTEMP_DIR} --skip-networking &

echo "Waiting 2 seconds to make sure that MySQL is up"
sleep 2

Then I would start ./tests/test_dbi like this:

( echo ./drivers/mysql/.libs; \
        echo mysql; \
        echo root; \
        echo ""; \
        echo ""; \
        echo "libdbitest"; \
        ) | ./tests/test_dbi

Then it's replying by:

Unable to connect! Error message: 1045: Access denied for user
'root'@'localhost' (using password: NO)

because it's trying to use the wrong socket file. So would there be a
way to have it use ${MYTEMP_DIR}/mysql.sock instead?

Let me know,

Thomas



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to