Can't SET NAMES in my.cnf mysql config file

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Can't SET NAMES in my.cnf mysql config file

Postby Graucho Marx » 24. February 2015 12:40

Hello everybody,
I am a new Apache Friends user but I have been playing with XAMPP for a while.
OK, so this is my question: I have been reading about encoding in mysql. And I have a problem. I am trying to set all my encoding to UTF8. I saw that editing "my.cnf" would achieve that. The thing is I cannot manage to change character_set_client, character_set_results and character_set_connection, the parameters managed from SET NAMES order.
This is what I added under [sqld] in my.cnf:
Code: Select all
init_connect='SET NAMES utf8'

I have discovered two things:
First, there is a file called "databaseinterface.class.php" which is in charge of setting the initial parameters. If I edit this file, I manage to do it.
Second, UTF8 is automatically converted into UTF8MB4. I read that this is just an improvement of UTF8, so that's fine for me.

So, bottom line: can I change client, results and connection encoding from my.cnf or do I need to edit "databaseinterface.class.php"?

Thanks a lot!
Graucho Marx
Posts: 2
Joined: 24. February 2015 10:55
Location: Barcelona
Operating System: Mac OS X 10.8.5 & 10.11.13

Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 3 guests