> But in both case i am getting the errors
The error message, itself, would be useful.
But, more importantly, what do you hope to gain by PARTITIONing? PARTITIONing, by itself, rarely provides any performance gain.
If LectureID is the PK, then there is no reason to have a compound key starting with LectureID:
(LectureId, ClassroomId, Date, ActualStartTime, ActualEndTime)
Move LectureID to the end, and make it non-UNIQUE. Or perhaps starting with Date makes the most sense; it depends on your queries.
What are the SELECTs you will be doing against these tables? From that, we can discuss the 'right' indexes, and whether PARTITIONing makes sense.
Partitioning on the PRIMARY KEY is rarely useful.
> Date DATETIME
> ActualStartTime Time
> ActualEndTime Time
Suggest using the DATE datatype for Date.
Usually I argue against splitting dates and times, but this might be an exception.
See
http://mysql.rjweb.org/doc.php/ricksrots
especially the sections on PARTITIONs and INDEXes.