Relocated to another host, database.php seems to handle mysql?

So unlike other apps, migration of this app seems different,

is all I need to do /upload my dump to phpmyadmin/new_database

run /update?

My new database has a different name than before, most php based apps have a config.file that has database user and database name.

Does invoiceninja have such a file?

If not, just run /update?

sorry to ask, couldnt find an appropriate answer on google.

Thanks,
Regards,
Kyle

There is a file in the root folder called .env

If you edit this file, you will be able to edit the db credential directly.

Where is the db credential directory, and what do I need to change in .env?

Thanks,
Kyle

EDIT: Nevermind, I see that the database info is in the .env

So if I change this,

DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

Essentially that’s what im looking for and it will handle fixing my mysql database settings.

Thanks,
Kyle

Hey guys, I need some help here

Have updated .env but when I go to my location it has the new credentials in place, but says “undefined index: driver” when I test connection.

Whats going on here?

Need better details.

Thanks,
Kyle

To be more precise,

After I edit .env files on load of website it takes me to /setup , shows all new credentails, when click “test connection” I get Undefined index: driver,

Have no idea what this means, never had trouble moving an app this way, database is fully uploaded same as before, put in new credentials in .env file.

Please help.
thanks,
Kyle

If you’re using a populated database you shouldn’t see the setup screen, my guess is there’s something wrong with the .env file. I’d suggest comparing it to this file:

https://github.com/invoiceninja/invoiceninja/blob/master/.env.example

I couldn’t get it, I think it was because I was working in an unstable environment, ie (possible mixed propagation going on)

So I gave up and did a full Cpanel backup,

Not sure why I wanted to manually move them one by one anyway… lol

Regardless,

I want to make this clear for google search with some keywords, for others.

“If you are migrating invoice ninja to another server (self host) then you can find the config data for MYsql in the .env file”

“Invoice ninja, self host, Migration, server migration”

Hope if someone else needs this they find it via google to alleviate all the hard work these guys put into support for this thing.

Also, if you make your responses to people like that it will create more search keywords to help users find answers to the stuff you may have answered 100x, SEO 101 :smiley:

Best Regards,
Kyle