Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting data problem with MYSQL under linux

Recently I started to use Linux (Ubuntu 9.10) instead of windows. I am working on a java web application with Spring, MYSQL with jpa. However, before to install linux I made a backup file from the database, then installed linux, installed the MYSQL Query Browser and Administrator tools, and using the Admin tool restored the backup file, then got all the tables and made a simple select statement from one of the tables and got result normally and everything seems to work just fine.

There a USER table, and there's a namedQuery defined to get a user by userName, the problem is that when I pass a correct userName I still get nothing!

I really don't know what is the problem! The application was working perfectly under windows!

Please, can anyone help me to solve this problem?

Thank you in advance.

like image 604
user256872 Avatar asked Feb 14 '26 18:02

user256872


2 Answers

The first thing that comes to mind is that MySQL table names are case sensitive on Linux but not on Windows. i.e. this might have worked on Windows:

SELECT ... FROM User ...

but on Linux you need to use the correct case for the table name:

SELECT ... FROM USER ...

but without more information it's really difficult to tell.

like image 94
Martin Avatar answered Feb 16 '26 09:02

Martin


There are some settings that have different defaults under Windows and Linux, case sensitivity of table names etc. being one of them. It could be that a non-specified setting defaulted to one value on windows, but another under linux.

like image 23
davek Avatar answered Feb 16 '26 10:02

davek