Case Insensitive MySQL Database

On my MySQL database, my collation is set to utf8_general_ci. I also checked the collation of table in my database. This should allow for case insensitive queries. However all queries are still are still case sensitive.

For example, this query will not work if I have the username with the first letter capitalized.

  FROM   users 
  WHERE  username = 'test' 
  AND    password = 'test' 

I am using MySQL 5.5.27 Community edition. Thanks.


Your collation set to ci (case-insensitive) only affects the way you search in data, not columns. IIRC, column names are case sensitive and table names aren't.

Follow a standard naming convention for your database.

Need Your Help

Rails, formtastic and postgres: NotNullViolation

ruby-on-rails postgresql activeadmin formtastic

this one isnt googling at all, so i have no choice but to bother you with such braincracker.

Is my use of WCF async beneficial?

c# .net wcf asynchronous async-await

I'm trying to quickly convert a couple of our WCF calls to use the asynchronous-generated methods. I'm still somewhat new to using async/await in our code (I'm primarily a web developer) and want t...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.