How to create an entry with MySQL? I'm trying to create a new entry from within the database. The section is defined in craft_sections, and the entries for craft_elements, and craft_entries seem correct after the script is run, but no entries are displayed in the UI.
If you really, really want to create an entry from within the database (you must have a VERY good reason to do so), then you should create a row in:


entries
elements
elements_sites
content


If you'd like the easier path, use Content migrations. Create a migration, and then add something like:

// Create the entry
$myNewEntry = new craft\elements\Entry();
$myNewEntry-&gt;setFieldValues([
    'title' =&gt; 'My new entry',
    'myCustomFieldHandle' =&gt; 'Look, I can even set a custom field!',
    'myCustomCategoryFieldHandle' =&gt; [$categoryILookedUp-&gt;id],
]);

// Save the entry. Everything else will be handled for you by Craft's API.
Craft::$app-&gt;getElements()-&gt;saveElement($myNewEntry);