Hi Hillel, Hope you are doing well. This is Ranjeet, and we are planning to use invoiceninja with our system, I do have explored the invoiceninja and it’s pretty much helpful in our our system in terms of flexibility and API based data transactions. While exploring the invoiceninja I came across some things like I did not found in single documentation for self hosted version installation and also for API documentation. So we need to have some suggestions from your side which version is stable version and can you provide single documentation for API, as we are planning to integrate APIs as well. my
hi @hillel , achintye here, when doing a docker run, we are getting this error:
In Connection.php line 678:
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from inform
ation_schema.tables where table_schema = ninja and table_name = accounts an
d table_type = 'BASE TABLE')
In Exception.php line 18:
SQLSTATE[HY000] [2002] No such file or directory
In PDOConnection.php line 38:
SQLSTATE[HY000] [2002] No such file or directory
getting the same when generating the app-key.
We haven’t been able to find much around this on the forums/stackoverflow, if you could guide us on this, would be great!
Hi @hillel , trying with connecting localhost’s mysql with docker. This is throwing same error as
In Connection.php line 678:
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables
where table_schema = ninja and table_name = accounts and table_type = 'BASE TABLE').
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables
where table_schema = ninja and table_name = accounts and table_type = ‘BASE TABLE’)
I’m trying to run Invoice Ninja for the first time, and the web interface for setup (“Invoice Ninja Setup”) produces the “SQLSTATE[HY000] [2002] No such file or directory” message when I click Test Connection.
I suspect MySQL isn’t running, as this error seems to be associated with MySQL not running.
Are there some Invoice Ninja setup links I should be looking at, that cover configuring and running MySQL or another database before launching the “Invoice Ninja Setup” page?
This means PHP cannot connect to your MYSQL server. Ensure the host is correct (if same as server, use 127.0.0.1 and not localhost). If you’re using docker file you need to set the correct server address for MYSQL (cannot be 127.0.0.1 as that is the invoiceninja container itself).
I enjoy the assumption MySQL is running and has some configuration relevant to Invoice Ninja, that can be straightened out by changing an Invoice Ninja configuration parameter. I’ll repeat my question:
“Are there some Invoice Ninja setup links I should be looking at, that cover configuring and running MySQL or another database before launching the ‘Invoice Ninja Setup’ page?”
I ask because I see no evidence MySQL is running at all, and none of the instructions I’ve seen mention configuring it or launching it for use with Invoice Ninja.
This heavily depends on your configuration and OS. Setting up the database (if not using docker) is not specific to Invoice Ninja; you should simply create a new database, database user with a login and permission to access from specific IPs or % (for all subnets).
Ex. How To Install MariaDB on Ubuntu 22.04 | DigitalOcean
depending on your OS you will be able to run command like sudo systemctl status mariadb.service to see if it’s running which is not something specific to Invoice Ninja.
If you’re not self hosting using docker I recommend using CloudPanel as hosting control panel - it will set everything up (web server, phpmyadmin, database etc.) for you. Or use the hosted option. You will only click a button to make the database user, import invoice ninja zip, and run a few commands to extract and optimize.