Look at the name of the table its using:
See the "." right before users? I don't know for sure, but it looks to me like that is missing the schema name (not sure what MySQL calls it - database name? username?)
You probably just have to configure your persistence.xml a little more to tell Hibernate the schema name.
Just a thought - I have no idea if what I just said is right :) But for sure it seems like ".users" isn't right - table names don't have dots as their first character.
You can't use "normal" SQL in the createQuery method, you have to use JPA QL.
So, try this:
List<User> users = em.createQuery("from "+User.class).getResultList();
You'll get a list of User objects and you can filter out the usernames from that.