# Mac OSX

## Installation

1. Install XAMPP: <https://www.apachefriends.org/index.html>
2. Copy/extract Open Enventory into Applications/XAMPP/htdocs/ . Write down the folder name because this will be the web address. In this case the folder is named ‘open\_enventory’

![](/files/-Lril4udJlvve_Mc9PJv)

3\. Open Applications/XAMPP manager. Start MySQL and Apache.

![](/files/-Lril4ueFpBk8F_8aQRw)

4\. Change mysql root password by following these steps:

1. Ensure that the MySQL/MariaDB server is running. (see step 3)
2. Open a new terminal.
3. Use the mysqladmin command-line utility to alter the MySQL/MariaDB password, using the following syntax:\
   `mysqladmin --user=root password "newpassword"`<br>
4. The *mysqladmin* command-line utility is located within the *bin/* subdirectory of the XAMPP installation directory, typically */Applications/XAMPP*.
5. For example, to change the MySQL/MariaDB root password from its default empty value to the password gue55me, you would execute:`/Applications/XAMPP/bin/mysqladmin --user=root password "gue55me"`\
   \ <img src="/files/-Lril4ufdQA8xkSZmbik" alt="" data-size="original">
6. Or, if a password has already been previously set and you’d like to change it to a new one, you can use the following syntax:\
   \
   `mysqladmin --user=root --password=oldpassword password "newpassword"`
7. For example, to change the root password from 12345 to gue55me, you would execute:\
   `/Applications/XAMPP/bin/mysqladmin --user=root --password=12345 password "gue55me"`

5\. Test that your password change has been accepted, by attempting to connect to the MySQL/MariaDB server using the *mysql*command-line client in the same directory. For example, you could use the command below to connect to the server and return the results of a calculation: (make sure you use your own password instead of “gue55me”)

```bash
/Applications/XAMPP/bin/mysql --user=root --password=gue55me -e "SELECT 1+1"
```

{% hint style="warning" %}
Steps 6 & 7 are for phpmyadmin set up. They are optional. You don’t need to do this if you just want to set up Open Enventory

6\. Change the permission for Applications/XAMPP/xamppfiles/phpmyadmin so that *you/your\_account* have the read and write access, through right click, Get Info (or Cmd-I)

7\. Use TextEdit to edit file config.inc.php. Locate:\
&#x20;   `$cfg['Servers'][$i]['auth_type'] = 'config';`\
and change to:\
&#x20;   `$cfg['Servers'][$i]['auth_type'] = 'cookie';`
{% endhint %}

8\. Using a web browser, go to:[ http://localhost/open\_enventory/](http://localhost/open_enventory/)

* In Database: put in the name for your database server
* Log in with username ‘root’ and set password\
  Notice the error messages  &#x20;

![](/files/-Lril4uhGBxp8Degn4I3)

9\. Under Warning above notice the place of the temp folder (in this case /var/folders/87/…)

10\. Go to that folder containing the openenv.log (in this case: T with the path as following in Finder (file maybe hidden):\
&#x20;   `/var/folders/87/b98_ym4x1r91ldysmq8r29kc0000gn/T/`

![](/files/-Lril4uiG8d4VzAGEeU6)

11\. Set permission for everyone to Read\&Write for this folder (e.g. “T”)

12\. Look-up file php.ini. Should be in Applications/XAMPP/xamppfiles/etc/

![](/files/-Lril4ujJYQfu72pEIyq)

And change to:\
`error_reporting=E_ALL & ~E_NOTICE`

13\. Restart Apache and SQL in XAMPP manager

14\. Restart the web browser and go the server website at: <http://localhost/open_enventory/>\
&#x20;   \- In Database: put in the name for your database server\
&#x20;   \- Log in with username ‘root’ and set password

## **CHANGE TIME ZONE**

1. Edit php.ini with TextEdit:\
   Path: `/Applications/XAMPP/xamppfiles/etc/php.ini`\
   Change:\
   &#x20;   `date.timezone=Europe/Berlin`\
   to:\
   &#x20;   `date.timezone=America/Chicago`
2. Restart server

## **CHANGE LOGIN DEFAULT DATABASE TO NONE**

1. Edit lib\_global\_funcs.php with TextEdit:\
   Path: `/Applications/XAMPP/xamppfiles/htdocs/open_enventory/`\
   Change:\
   `if ($db_name=="") {`\
   &#x20;   `$db_name="storage";`

   to:\
   `if ($db_name=="") {`\
   &#x20;   `$db_name="";`

2\. Restart server

## **SAVE/ BACK-UP and RESTORE DATABASE**

See this page:

{% content-ref url="/pages/-LwENcnbesM0aZXiov\_b" %}
[Database Backup and Restore](/user-guides/user-guides/chemical-inventory/database/database-backup-and-restore.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://open-enventory.gitbook.io/user-guides/installation/mac-osx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
