MariaDB config file not found

See original GitHub issue

Describe the bug Working on setting up a production environment on a fresh install of ubuntu 20.04.3. Went thru the steps listed on the readthedocs site (using mysql/MariaDB). When I enter the “pip3 install mysqlclient mariadb” command (in the virtual environment) I get the following …

` (env) inventree@Meta:~$ pip3 install mysqlclient mariadb Collecting mysqlclient Using cached mysqlclient-2.1.0.tar.gz (87 kB) Collecting mariadb Using cached mariadb-1.0.8.zip (85 kB)

ERROR: Command errored out with exit status 1: command: /home/inventree/env/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-xibnrply/mariadb/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-xibnrply/mariadb/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ egg_info --egg-base /tmp/pip-install-xibnrply/mariadb/pip-egg-info cwd: /tmp/pip-install-xibnrply/mariadb/ Complete output (17 lines): /bin/sh: 1: mariadb_config: not found Traceback (most recent call last): File “<string>”, line 1, in <module> File “/tmp/pip-install-xibnrply/mariadb/setup.py”, line 26, in <module> cfg = get_config(options) File “/tmp/pip-install-xibnrply/mariadb/mariadb_posix.py”, line 59, in get_config cc_version = mariadb_config(config_prg, “cc_version”) File “/tmp/pip-install-xibnrply/mariadb/mariadb_posix.py”, line 28, in mariadb_config raise EnvironmentError( OSError: mariadb_config not found.

Please make sure, that MariaDB Connector/C is installed on your system.
Either set the environment variable MARIADB_CONFIG or edit the configuration
file 'site.cfg' and set the 'mariadb_config option, which should point
to the mariadb_config utility.
The MariaDB Download website at <https://downloads.mariadb.com/Connectors/c/>
provides latest stable releease of Connector/C.
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ’

I am somewhat new to python env so I’m unsure of where to look for the specified config files or how they relate to the environment variables.

Expected behavior Unsure of expected behavior, When I move on to the next steps (creating database and user within MySQL) the database is created but I get the following when trying to grant permissions…

’ mysql> CREATE USER ‘inventree’@‘%’ IDENTIFIED WITH mysql_native_password BY ‘doors2021!’; Query OK, 0 rows affected (0.12 sec)

mysql> GRANT ALL ON inventree.* TO ‘djangouser’@‘%’; ERROR 1410 (42000): You are not allowed to create a user with GRANT ’

Deployment Method

  • Bare Metal - Ubuntu 20.04.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SchrodingersGatcommented, Nov 30, 2021

Please make sure, that MariaDB Connector/C is installed on your system.

Did you complete this step?

0reactions
huseyinkogocommented, Jan 11, 2022

RELATED: fresh install on debain 10.

root@localhost:~# sudo mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 40
Server version: 10.3.31-MariaDB-0+deb10u1 Debian 10

Getting this syntax error when i input create user command

MariaDB [(none)]>  CREATE USER 'inventree'@'%' IDENTIFIED WITH mysql_native_password BY '3gssdg2srhgsd!';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY '3gssdg2srhgsd!'' at line 1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring MariaDB with Option Files
You can configure MariaDB to run the way you want by configuring the server with MariaDB's option files. The default MariaDB option file...
Read more >
Mariadb configuration is not loaded from my.cnf - Stack Overflow
Am I missing somethig or making some mistake. I have checked the files permissions in /var/log/mariadb/mysqld.log & /var/run/mysqld/mysqld.
Read more >
MariaDB is ignoring /etc/my.cnf - DBA Stack Exchange
If /etc/my.cnf is not open, check that it belongs to mysql user and is readable by its owner. Also check that no configuration...
Read more >
The MySQL config file /etc/my.cnf was not found on your ...
OK: the problem of 'DB not connecting' is due to a missing configuration file, namely /etc/my.cnf. Due to this missing file, MySQL is...
Read more >
Configure MariaDB server on CentOS - - Rackspace
By default, you'll find MariaDB's configuration file at the following location: /etc/my.cnf. If it's not there you can use mysqld to look ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found