# Specify6 Wizard could not insert StorageTreeDef

**URL:** <https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526>\
**Category:** Get Help\
**Created:** [January 29, 2024, 2:55pm UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526 "2024-01-29T14:55:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedoras](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/fedoras/32/455_2.png) [@fedoras](https://speciforum.org/u/fedoras)\
**Post date:** [January 29, 2024, 2:55pm UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/1 "2024-01-29T14:55:43Z")

</div>

I’m trying to use the Specify6.8.03 wizard to create a new database from scratch. Set all the permissions right, go through the whole preparation and then every time get met with this error message:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/7737add8d1d47d258d65834595fd0475b07b6c07.png)

What gives!?

---

<div class="post-metadata">

**Author:** ![fedoras](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/fedoras/32/455_2.png) [@fedoras](https://speciforum.org/u/fedoras)\
**Post date:** [January 30, 2024, 9:43am UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/2 "2024-01-30T09:43:34Z")

</div>

Well, it turns out I have faced this issue before, but since I don’t do this very often I forgot that one needs to press the one button and not the other:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/8/861a941a1c2c7dbe7aa7211551a66f4d15db06be.png)

I look forward to no longer needing Specify6 for this process, because it is very clunky and quite unclear, especially here. Clearly, one wants to test the IT Login to make sure it works, and the phrase “…if you manually created the database” could be taken as having created the empty database, which I did. It’s very unclear it meant “the database and the full structure”. I mean, that is what the wizard is for, right? Who in their right mind would manually create each table for this ever?

---

<div class="post-metadata">

**Author:** ![fedoras](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/fedoras/32/455_2.png) [@fedoras](https://speciforum.org/u/fedoras)\
**Post date:** [January 30, 2024, 9:49am UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/3 "2024-01-30T09:49:44Z")

</div>

Not out of the woods yet, though… 😫

![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/0d6955d1a6ef5ab495302e643dbab50a15fa7262.png)

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [January 30, 2024, 4:12pm UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/4 "2024-01-30T16:12:00Z")

</div>

Hi @fedoras,

> [@fedoras](#):
>
> I look forward to no longer needing Specify6 for this process, because it is very clunky and quite unclear, especially here. Clearly, one wants to test the IT Login to make sure it works, and the phrase “…if you manually created the database” could be taken as having created the empty database, which I did. It’s very unclear it meant “the database and the full structure”. I mean, that is what the wizard is for, right? Who in their right mind would manually create each table for this ever?

Actually, this is correct. The `Test IT Login` function allows you to use the Wizard with an entirely blank database as long as you have given the IT User the appropriate permissions.

In the log file you sent via email, I see the following is where it ends:

```auto
240130 11:19:40 92 Query select count(*) from spversion
                    92 Query INSERT INTO spversion (AppName, AppVersion, SchemaVersion, TimestampCreated, TimestampModified, Version) VALUES('Specify', '6.8.03', '2.10', '2024-01-30 11:19:40', '2024-01-30 11:19:40', 1)

```

I have never seen the database build process fail at this point before, so I’d like to get a better idea of the installation environment / permissions of the SQL user.

Can you share the permissions of the `ituser` in MariaDB?

```auto
SHOW GRANTS FOR 'ituser'@'localhost';

```

Can you also share your MariaDB version?

Thank you!

---

<div class="post-metadata">

**Author:** ![fedoras](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/fedoras/32/455_2.png) [@fedoras](https://speciforum.org/u/fedoras)\
**Post date:** [January 31, 2024, 12:52pm UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/5 "2024-01-31T12:52:23Z")

</div>

> Actually, this is correct. The `Test IT Login` function allows you to use the Wizard with an entirely blank database as long as you have given the IT User the appropriate permissions.

But then it will not create all the necessary tables and therefore fail on the step where it starts inserting data into StorageTreeDef…

> Can you share the permissions of the `ituser` in MariaDB?

Actually, the screenshot I made was not of the actual process I went through. The real username is ‘situ’ and the host is ‘specifydb01fl’

For some reason, even though I can log in as the user to the database and so can the wizard using it, it states “no such grant defined”. I don’t understand that…

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/6/6711c9f3204c5dd27a5befbff4286ed047e81d34.png)

The MariaDB is version 10.3.39… Should I upgrade?

Not specifying the host does give these results:

```auto
GRANT RELOAD, CREATE USER ON *.* TO `situ`@`%` IDENTIFIED BY PASSWORD '*84765546CA9517C6D4BD50D31108251F3A9D1864'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `Specify`.* TO `situ`@`%` WITH GRANT OPTION
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `AUH`.* TO `situ`@`%` WITH GRANT OPTION
GRANT SELECT ON `mysql`.* TO `situ`@`%`

```

The database I’m trying to create is the one called **AUH**

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [January 31, 2024, 2:05pm UTC](https://speciforum.org/t/specify6-wizard-could-not-insert-storagetreedef/1526/6 "2024-01-31T14:05:15Z")

</div>

> [@fedoras](#):
>
> > Actually, this is correct. The `Test IT Login` function allows you to use the Wizard with an entirely blank database as long as you have given the IT User the appropriate permissions.
> 
> But then it will not create all the necessary tables and therefore fail on the step where it starts inserting data into StorageTreeDef…

If you already tried to create a database with the same name, the `Test IT Login` function will skip the very important step of dropping the existing database and creating a new one. If the database is **not empty** , it will inevitably fail due to the wizard attempting to insert a duplicate record (duplicate specify username, duplicate tree, etc.).

It is possible that the error is happening at the same place in both instances, the error reporting is just different during the generation process and in the wizard. The error should be logged in the file available at `C:\Users\USERNAME\Specify\specify.log` and may provide additional insight into the issue.

> The MariaDB is version 10.3.39… Should I upgrade?

MariaDB 10.3+ is supported, but internally we are using version 11.2.2. Upgrading would be beneficial in the long run!

I’ve asked a member of our team with SQL expertise to take a closer look later today at this issue! Thank you for your patience and for providing additional information!
