# 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’

![](https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4udJlvve_Mc9PJv%2F0.png?generation=1571668910652845\&alt=media)

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

![](https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4ueFpBk8F_8aQRw%2F1.png?generation=1571668910620979\&alt=media)

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="https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4ufdQA8xkSZmbik%2F2.png?generation=1571668910615912&#x26;alt=media" 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;

![](https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4uhGBxp8Degn4I3%2F4.png?generation=1571668910674328\&alt=media)

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/`

![](https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4uiG8d4VzAGEeU6%2F5.png?generation=1571668910625685\&alt=media)

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/

![](https://3925781610-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fuser-guides%2F-LrikiEWllOypD1OZ51U%2F-Lril4ujJYQfu72pEIyq%2F6.png?generation=1571668910660440\&alt=media)

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="../user-guides/chemical-inventory/database/database-backup-and-restore" %}
[database-backup-and-restore](https://open-enventory.gitbook.io/user-guides/kv.2019-12-01/user-guides/chemical-inventory/database/database-backup-and-restore)
{% endcontent-ref %}
