New database and where do I find the port?

I downloaded Nextcloud to the server and installed it as normal. So only the Admin Name and password are given. How can I specify the database now and which port do I have to enter?

Configure your cloud in config.ini

During setup you missed the dialog to enter your db connection values.

Here you find a step-by-step guide to install Nextcloud, including the database setup:

Yeah, sure, thanks a lot. I know all the data, but I don’t know the port.

Unfortunately you’ve not written which database you want to use, therefore this question cannot generally be answered and you’ve not read the provided description, otherwise you would have seen, under step 6/7, which port e.g. MariaDB use by default :wink:

Sorry, I’m not that expert. I want to use a mysqli database.

“mysqli” is a driver name but not a database. I would recommend to install and use MariaDB 10.x. So best would be to follow the available step-by-step descriptions as the one I’ve provided.

<?php $CONFIG = array ( 'instanceid' => 'ocee4nx5fqzl', 'passwordsalt' => 'ITglfowizIGNJ9S8+Q2iWwvCf3OGWZ', 'secret' => 'eKE83D6HWipci5fFo4wunT4Z1ZzGVbTamyo7002XrdCl71N9', 'trusted_domains' => array ( 0 => 'Known', ), 'datadirectory' => 'Known', 'dbtype' => 'sqlite3 (should be mysqli)', 'version' => 'Not known', 'overwrite.cli.url' => 'Known', 'dbname' => 'Known', 'dbhost' => 'Known', 'dbport' => 'Not known', 'dbtableprefix' => 'oc_', 'dbuser' => 'Known', 'dbpassword' => 'Known', 'installed' => true, );

Again, please tell us which OS you’re using which database you have installed, etc., etc.!! Better is to read one of the many existing guides which explain how to install Nextcloud on your OS. Aunt G. knows where to find them!!

1 Like

Looks like you didn’t change the default sqlite to mysql.
I think you can do your setup again by removing your config.php (or change it’s name so you have a backup) and add a file named CAN_INSTALL in the same directory. Then browse to and do the setup again. Remember to change to the mysql this time. :wink:

The port is the port your mysql uses… Look it’s configs too.

I get this error message when all the data is entered.

Habe das Bild entfernt.
Bitte immer die Passwörter unkenntlich machen.
Sonst kann sich jeder mit Deiner Datenbank verbinden, wenn der Hoster dass nicht einschränkt

Verstehe, mache ich. All right, I will.
Here is the error message I get.

Error while trying to initialise the database: An exception occurred while executing ‘CREATE TABLE oc_migrations (app VARCHAR(255) NOT NULL, version VARCHAR(255) NOT NULL, PRIMARY KEY(app, version)) DEFAULT CHARACTER SET UTF8 COLLATE utf8_bin ENGINE = InnoDB’: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

What is your Mariadb version?

I have no Mariadb, only MySQL 8.0.

Thanks for your answers.

Did you find a solution?
I ran out of ideas…

Sorry no. :disappointed_relieved:

Now everything has worked, thank you very much!
Jetzt hat alles funktioniert, vielen Dank!