How to create Parent record on Child record creation and assign Parent ID to Child record in MySQL
No it's not possible to create a child record without creating the parent record, but you can always(even in programming languages) insert into the parent table first and then insert into the child table.

insert into parent_table(id) values(1);
insert into child_table(childid,name,id) values(1,"x",1);


For example in any programming language if you have the id number that you want to add to your database you can use it in both insert statements.