I'm trying to install buildkit on my Ubuntu 19.04 laptop, per the instructions at https://docs.civicrm.org/dev/en/latest/tools/buildkit/#config

I've used curl to run the script, successfully - civicbuild -h works - and am now on the amp config step.

When trying to create a mysql_dsn using either

mysql://joe:randompass@ or mysql://joe:pass@localhost:3306

I get this error:

SQLSTATE[HY000] [1045] Access denied for user 'joe'@'localhost' (using password: YES)

Running amp config:get does not show an existing mysql_type , which I think means there is not an existing mysql database that I can't log in to.

Running amp cleanup shows Destroyed 0 instance(s)

Running amp show returns an empty list

Running amp test shows this error:

PHP Fatal error:  Uncaught Error: Call to a member function getDriver() on null in phar:///home/joe/buildkit/bin/amp/src/Amp/Database/MySQL.php:59
Stack trace:
#0 phar:///home/joe/buildkit/bin/amp/src/Amp/InstanceRepository.php(56): Amp\Database\MySQL->createDatasource('canary')
#1 phar:///home/joe/buildkit/bin/amp/src/Amp/Command/CreateCommand.php(107): Amp\InstanceRepository->create(Object(Amp\Instance), true, true, 'admin')
#2 phar:///home/joe/buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Amp\Command\CreateCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///home/joe/buildkit/bin/amp/src/Amp/Command/ContainerAwareCommand.php(26): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 phar:///home/joe/buildkit/bin/amp/src/Amp/Command/TestCommand.php(65): Amp\Command\ContainerAwareCommand->doComman in phar:///home/joe/buildkit/bin/amp/src/Amp/Database/MySQL.php on line 59

I'm trying to figure out the error message, Googling that.

  • I'm sure you will have tried this, but you don't mention it... can you login with those details via mysql command line? – Aidan Sep 4 '19 at 7:16
  • @Aidan yeah so I did a purge of MySQL stuff, reinstalled, can get to the >mysql command line, created a new root account, created a new dummy table, that all works. Tried to create a mysql_dsn again using amp config and for user joe, still get the same error - Access denied. Came across this, link below, which is similar, thinking there's some issue with leftover docker settings when I was trying civicrm-buildkit-docker - github.com/michaelmcandrew/civicrm-buildkit-docker/issues/28 . – Joe McLaughlin Sep 4 '19 at 17:53

So, duh. I haven't totally figured out the problem - now I'm getting this -

SQLSTATE[HY000] [2002] Connection refused

but the Access denied issue was a simple fix, i.e., use chmod.

See "How to Run MySQL as a Normal User" at https://dev.mysql.com/doc/refman/5.7/en/changing-mysql-user.html .

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.