Guides › AI and your store data
Is it safe to connect AI to your Magento database?
Short answer: it can be, if the tool can only read, can't touch sensitive tables, masks personal data before anything goes to the AI provider, and logs every query. Ask any vendor these 10 questions before you install anything.
The 10 questions
- Does it use a separate, read-only database user? Not the main Magento user, which can change everything.
- Is read-only also enforced on each connection? So a wrongly configured user still can't write.
- Does it allow only one SELECT at a time? No multiple statements, no file access, no system tables.
- Are sensitive tables blocked? Admin accounts, API tokens, saved payment cards, the store configuration (which holds keys and passwords) and raw payment data.
- What exactly is sent to the AI provider? Table names, store setup, your question, result rows? Get a clear list.
- Is personal data masked before it leaves your server? Names, emails, addresses, phone numbers and card details.
- Are there limits? A row limit and a query timeout, so a heavy query can't slow your live store.
- Is every question logged? Who asked, the query that ran and how many rows it returned.
- Who can use it? Check its admin permissions, and remember that a database user sees every website, whatever an admin role's scope says.
- Where do the database credentials live? Ideally in
app/etc/env.php, not in an admin screen anyone can open.
How AI Reports answers each one
| # | AI Reports |
|---|---|
| 1 | Yes. It needs its own read-only MySQL user and refuses to run without one. |
| 2 | Yes. Every connection is set to read-only (SET SESSION TRANSACTION READ ONLY). |
| 3 | Yes. One SELECT only; comments, multiple statements, system schemas and functions such as LOAD_FILE or SLEEP are refused before anything runs. |
| 4 | Yes. A built-in list that can't be switched off blocks credential, token, saved-card, configuration and raw payment tables, and you can add your own. Blocked tables are also hidden from the AI. |
| 5 | Your store's structure (tables, attributes, store and category names, status codes), your business rules and the question. In Answer mode, also up to 20 rows per query, masked. Table + CSV mode sends no result rows. |
| 6 | Yes, on by default: by column name, through renamed columns, inside JSON, and by scanning values for emails, card numbers, phone numbers and IP addresses. |
| 7 | Yes. 1,000 rows and a 5-second database timeout by default. |
| 8 | Yes. An admin grid and a log file record the user, the query, rows, cost and time. |
| 9 | Four separate admin permissions, and the guide warns about the all-websites point. |
| 10 | Only in app/etc/env.php. Not visible or editable in the admin. |
Your AI provider's own terms apply to what it receives. If customer data must never be stored, ask your provider about zero data retention.