# Problem when converting DB

**URL:** <https://help.nextcloud.com/t/problem-when-converting-db/103375>\
**Category:** ℹ️ Support\
**Tags:** database\
**Created:** [January 5, 2021, 11:24pm UTC](https://help.nextcloud.com/t/problem-when-converting-db/103375 "2021-01-05T23:24:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stdcerr](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stdcerr/32/19611_2.png) [@stdcerr](https://help.nextcloud.com/u/stdcerr)\
**Post date:** [January 5, 2021, 11:24pm UTC](https://help.nextcloud.com/t/problem-when-converting-db/103375/1 "2021-01-05T23:24:41Z")

</div>

Nextcloud version _(eg, 18.0.2)_: 17.0.3  
Operating system and version _(eg, Ubuntu 20.04)_:Raspbian GNU/Linux 10 (buster)  
Apache or nginx version _(eg, Apache 2.4.25)_: Apache 2.4.38  
PHP version _(eg, 7.1)_: 7.3.19

The issue you are facing:  
I’m trying to convert my DB from SQLite to MySQL anda m having issues with it.

Is this the first time you’ve seen this error? _(Y/N)_:  
Y

Steps to replicate it:

1. follow [Converting database type — Nextcloud latest Administration Manual latest documentation](https://docs.nextcloud.com/server/18/admin_manual/configuration_database/db_conversion.html)
2. create new db all fine but when I execute the actual command I get the following output:
3. 

```auto
$ sudo -u www-data php occ db:convert-type --all-apps mysql root localhost nextcloud
What is the database password?

In Connection.php line 64:
                                                                                                                                        
  Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  

```

The output of your Nextcloud log in **Admin \> Logging** :

```auto
No server logs

Everything is working fine

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => 'key',
  'passwordsalt' => 'key',
  'secret' => 'key',
  'trusted_domains' => 
  array (
    0 => 'raspi',
    1 => 'IP',
    2 => 'user.domain.org',
  ),
  'datadirectory' => '/var/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '17.0.3.1',
  'overwrite.cli.url' => 'http://raspi/nextcloud',
  'installed' => true,
  'maintenance' => false ,
  'theme' => '',
  'loglevel' => 0,
  'mail_from_address' => 'user',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'mail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.mail.com',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => 'user@mail.com',
  'mail_smtppassword' => 'pass',
  'filelocking.enabled' => true,
  'blacklisted_files' => array('.htaccess'),
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'app_install_overwrite' => 
  array (
    0 => 'twofactor_rcdevsopenotp',
  ),
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
...
192.168.1.1 - stdcerr [05/Jan/2021:23:23:23 +0000] "PROPFIND /nextcloud/remote.php/dav/files/stdcerr/USB/work/novax/src/novax-prs/docker/dey-2.2/sources/meta-openembedded/meta-oe/recipes-connectivity/modemmanager HTTP/1.1" 207 3047 "-" "Mozilla/5.0 (Linux) mirall/2.6.5-20200713.144448.adada8b2e-1.0~bionic1 (Nextcloud)"
192.168.1.1 - - [05/Jan/2021:23:23:32 +0000] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1446 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.1.222 - stdcerr [05/Jan/2021:23:23:13 +0000] "PUT /nextcloud/remote.php/dav/files/stdcerr/USB/work/novax/src/novax-prs/docker/dey-2.2/sources/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch HTTP/1.1" 201 743 "-" "Mozilla/5.0 (Linux) mirall/3.0.3git (Nextcloud)"
192.168.1.222 - stdcerr [05/Jan/2021:23:23:05 +0000] "PUT /nextcloud/remote.php/dav/files/stdcerr/USB/work/novax/src/novax-prs/docker/dey-2.2/sources/meta-openembedded/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch HTTP/1.1" 201 743 "-" "Mozilla/5.0 (Linux) mirall/3.0.3git (Nextcloud)"

```

This while I can connect fine toi my db with `$ sudo mysql -uroot` from the shell

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 9:53pm UTC](https://help.nextcloud.com/t/problem-when-converting-db/103375/2 "2024-12-12T21:53:08Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 9:53pm UTC](https://help.nextcloud.com/t/problem-when-converting-db/103375/3 "2024-12-12T21:53:10Z")

</div>


