Fresh Install Failing on MySQL


#1

Steps to reproduce

  1. Clean install selecting MySQL/MariaDB option

Expected behaviour

It should install?

Actual behaviour

Just gives error to check owncloud.log and below is what it gives. No idea what the error is actually.

Server configuration

Operating system:
Linux dedi488.flk1.host-h.net 4.9.0-0.bpo.8-amd64 #1 SMP Debian 4.9.110-3+deb9u5~deb8u1 (2018-10-03) x86_64

Web server:
Apache

Database:
mysqlnd 5.0.12-dev - 20150407

PHP version:
7.2.16-1+0~20190307202206.17+jessie~1.gbpa7be82

ownCloud version: (see ownCloud admin page)
10.1.1

Updated from an older ownCloud or fresh install:
No.

Where did you install ownCloud from:
Zip and Tar download and FTP upload.

The content of config/config.php:
$CONFIG = array (
‘instanceid’ => ‘och8br57xv4i’,
‘passwordsalt’ => ‘69cVvL+fSYbtRW9lvfBxdPBn8iavVK’,
‘secret’ => ‘DfG4Ud4LP7Fp/z+Mk5Q2JAyRkbKV8EolL5jSDq/BjHyfYvTL’,
‘trusted_domains’ =>
array (
0 => ‘DOMAIN’,
),
‘datadirectory’ => ‘/usr/www/users/cloudxznfb/data’,
‘overwrite.cli.url’ => ‘CLOUD LINK’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘10.1.1.1’,
‘dbname’ => ‘racepicscloud’,
‘dbhost’ => ‘SERVER ADDRESS’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,

List of activated apps:
None

Are you using external storage, if yes which one: local/smb/sftp/…
No.

Are you using encryption: yes/no
No.

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
No.

Client configuration

Browser:
Firefox

Operating system:
Windows 7

Logs

Web server error log

Nothing in server log.

#### ownCloud log (data/owncloud.log)

{"reqId":"XKr-9l6CF6MAADXAPFkAAAAw","level":3,"time":"2019-04-08T08:01:58+00:00","remoteAddr":"196.40.111.5","user":"--","app":"index","method":"POST","url":"\/index.php","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Class 'Doctrine\\\\DBAL\\\\Exception\\\\ConnectionException' not found\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(145): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/PDOMySql\\\/Driver.php(47): Doctrine\\\\DBAL\\\\DBALException::driverException(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#2 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(360): Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver->connect(Array, 'racepicscloud', '2kRl8kn27gj2t2k...', Array)\\n#3 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/DB\\\/Connection.php(59): Doctrine\\\\DBAL\\\\Connection->connect()\\n#4 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(429): OC\\\\DB\\\\Connection->connect()\\n#5 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(389): Doctrine\\\\DBAL\\\\Connection->getDatabasePlatformVersion()\\n#6 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(328): Doctrine\\\\DBAL\\\\Connection->detectDatabasePlatform()\\n#7 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(623): Doctrine\\\\DBAL\\\\Connection->getDatabasePlatform()\\n#8 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/DB\\\/Connection.php(144): Doctrine\\\\DBAL\\\\Connection->setTransactionIsolation(2)\\n#9 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172): OC\\\\DB\\\\Connection->__construct(Array, Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Configuration), Object(Doctrine\\\\Common\\\\EventManager))\\n#10 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/DB\\\/ConnectionFactory.php(145): Doctrine\\\\DBAL\\\\DriverManager::getConnection(Array, Object(Doctrine\\\\DBAL\\\\Configuration), Object(Doctrine\\\\Common\\\\EventManager))\\n#11 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/Setup\\\/MySQL.php(134): OC\\\\DB\\\\ConnectionFactory->getConnection('mysql', Array)\\n#12 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/Setup\\\/MySQL.php(39): OC\\\\Setup\\\\MySQL->connect()\\n#13 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/private\\\/Setup.php(326): OC\\\\Setup\\\\MySQL->setupDatabase('Test')\\n#14 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/core\\\/Controller\\\/SetupController.php(64): OC\\\\Setup->install(Array)\\n#15 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/base.php(846): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#16 \\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/index.php(54): OC::handleRequest()\\n#17 {main}\",\"File\":\"\\\/usr\\\/www\\\/users\\\/cloudxznfb\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":103}"}

I can simply not get ownCloud installed using MySQL/MariaDB option.

#2

After lookup in the code the exception comes from the DBAL MySqlDriver, where it wants to connect to the db (connect(array $params, $username = null, $password = null …)

  • Do you use correct credentials, i.e. can you log onto the db with the data you provided for ownCloud?

In any case have a look at the installation requirements, maybe you are missing something:


#3

Hi Corto,
Thanks for the feedback. And yes, the fields are all completed. My ISP also tested their side receiving the same error as well. They also let me know the server meets all the requirements bar 1…
“Database requirements, these are also met except I do notice that on our server the Binlog is:
binlog_format | STATEMENT”
Would that be such a big deal and is there some sort of workaround that you know of please?
Regards,
Paul


#4

I guess the binlog format should at least not prevent ownCloud from being installed, so I’d suggest we concentrate on the db connection itself. The actual exception in owncloud.log is truncated, so we cannot read WHICH exception was thrown.

  • I do not see the dbpassword config value in your config.php. Did you strip this or didn’t you supply one when installing? (Hint: when pasting a config.php remove passwordsalt and secret)
  • Do you have the chance to install ownCloud on the command line? The error messages are quite meaningful. This is IMO also the preferred way to install ownCloud.

If not: try out to connect to your database with a simple connection script, try for instance the PDO example from here: https://www.w3schools.com/php/php_mysql_connect.asp (replace myDB with your database name)
Then you could at least find out, if you can connect to the db with your credentials.

Without the actual exception, it is hard to find out, why DBAL could not connect to your db, it is even possible that your user does not have the permissions to create a db and so on.

My ISP also tested their side receiving the same error as well.

What exactly had your ISP been testing?

Hope, you can have your ownCloud installed :slight_smile:


#5

Hello,

You have no ‘dbpassword’ => ‘’, in your config.

If that was omitted in error for the post maybe check your ports are open too.

  • Mike

#6

Hi, That is the thing. I had no config on first installation and checked it that there is no username or password in. So I edited the config and added the username and password but it still gives the same error. Whether I have it in or not, with config or without.
Still need to follow the other instructions cortho gave above. Just not had time yet.