Adding print("lower_case_table_names=0"); to my.ini returns MySQL error #2002

Permalink
I've installed sitecore locally on my Windows 7 machine within WAMP. The installation went fine. The next time I tried to access the site, I got the mySQL error:

#2002 - No connection could be made because the target machine actively refused it.

The server is not responding (or the local server's socket is not correctly configured).

When I remove the line print("lower_case_table_names=0") from my.ini, everything works fine.

I'm concerned about removing this line, as the installation instructions specifically say:

"If your website host is under linux you will have a problem due to mysql database case sensitivity in table names, this causes the website to not load and present you with a bunch of error messages (which really sucks, and I speak from experience)"
"You can fix this BEFORE installing concrete5 by adding this line to your MySQL configuration file: (you only have to do this once)"

print("lower_case_table_names=0");

So, is it OK to remove this line now that concrete5 is installed? What happens if new DB's are added?

View Replies: View Best Answer
Remo replied on at Permalink Reply
Remo
I'd be careful with this. If it's just a playground it's not much of a problem but if you intend to copy the database to a *nix server, this will cause some troubles. New tables will be lowercase and won't work afterwards. You can rename them, no problem, but it's annoying..

What I don't understand, do you really have the word "print" in your my.ini file? It's just "lower_case_table_names=0", no print, no (..);
hollyb replied on at Permalink Reply
Yes, I did add print("lower_case_table_names=0"); to my.ini.

The how to instructions located here:

http://www.concrete5.org/documentation/how-tos/designers/installing...

specifically state:

You can fix this BEFORE installing concrete5 by adding this line to your MySQL configuration file: (you only have to do this once)

print("lower_case_table_names=0");

There is no mention of removing the print or the parenthesis. If these need to be removed, why would a tutorial for people installing concrete5 for the first time exclude such an important piece of info? This how to has been posted for over a year.

Anyway, the initial install with print("lower_case_table_names=0"); seemed to work. I was able to access the site locally and mySQL. All the tables appeared to be lower case. The problem is on subsequent tries, I cannot connect to mySQL without removing that print line.

Are you sure that "lower_case_table_names=0" is the answer? Should I ditch my current install and try again?

Confused.
hollyb replied on at Permalink Reply
OK, after further review the instructions linked above are probably misleading. I found this article:http://www.concrete5.org/documentation/how-tos/developers/mysql-dat... which specifically states that lower_case_table_names=0 needs to be added. Hopefully this means without the quotations.

I'm going to try an new install and see if this take care of the problem. I do think the 'how to' linked above should be changed to reflect what you are actually supposed to append to your my.ini file.
hollyb replied on at Permalink Best Answer Reply
I should have update that just using lower_case_table_names=0 worked for me. It appears that the instructions in the aforementioned tutorial are not correct.
Redrabbit12 replied on at Permalink Reply
I observed exactly the same as Hollyb. As soon as one adds the (obviously wrong)
print....
command to my.ini, phpmyadmin does not even start anymore (#2002 error). The W symbol in the lower right corner does not jump to green anymore. Wamp mentions the error in its protocol as unknown command or something. As soon as one removes the wrong command, WAMP functions normal again.

So what do we have to add, and where in my.ini?

Thanks,

redrabbit12
Redrabbit12 replied on at Permalink Reply
With this posting I activated monitoring of this thread :-)
Redrabbit12 replied on at Permalink Reply
Could this be the solution?
===================
Do these steps:
open your MySQL configuration file: ...\my.ini (as mentioned in WAMP instructions)
look for: [mysqld]
add this right below it:
lower_case_table_names=0
save the file and restart WAMP
===================

In my file [mysqld] is right at the bottom of the my.ini file, therefore the original WAMP instructions are probably right in this regard ("put it at the bottom"...).
However I GUESS that there is no blank line allowed therefore putting it just "at the bottom" MIGHT be wrong if someone adds a blank line before lower_case_table_names=0 (?).

I guess the final "product" should look like this (in my my.ini file):

... <-- this refers to all the stuff in the my.ini that comes before ;-)
[mysqld]
port=3306
lower_case_table_names=0

Ignore port=3306, thats just what is in my my.ini ;-)

I guess this SHOULD solve the problem.

How can I make sure that this is really the solution BEFORE I start designing my site? ;-) Aka is there a simple test to determine if this works?

All I can tell at the moment is that WAMP works fine if one adds lower_case_table_names=0 at the right place...
spacerider replied on at Permalink Reply
Use correct syntax spac should be used before and after = symbol.Without spaces it did not work.

# The MySQL server
[mysqld]
lower_case_table_names = 0
port= 3306

Worked for me :>
spacerider replied on at Permalink Reply
Use correct syntax space should be used before and after = symbol. Without spaces it did not work.

# The MySQL server
[mysqld]
lower_case_table_names = 0
port= 3306

Worked for me :>