group by left(col, x) text column - possible to index?
You may want to try something like this:
create table x 
(
  y varchar (25),
  z varchar (10) generated always as (left(y, 19)) stored, -- also virtual
  key (z) 
);

Or you could name the index as follows (see here):
CREATE INDEX x_z_ix ON x (z);

I find that giving explicit names to indexes is preferable - it gives more meaningful error messages.
Just because there is an index doesn't mean that the optimiser will actually use it! The table might be too small, too many nulls, skew in values &amp;c.
I'm not exactly sure what your own create table syntax is actually doing - could you post the output of show create table tab\G.