Thread Database Handle zerstört (39 answers)
Opened by Escape at 2010-04-22 17:03

pq
 2010-04-23 16:11
#136409 #136409
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
also mal zusammengefasst:
ich mache einen connect auf
"dbi:mysql:mysql_compression=1\n:database=foo\n:host=127.0.0.1:port=3307"
und kriege
"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'"

lasse ich die newlines (speziell das vor :host) weg, klappt der connect und das anschliessende select.

du machst ein connect auf
"dbi:mysql:mysql_compression=1\n:database=the_database\n:host=127.0.0.1\n:port=3306"

und das "geht".

warum ist es dir jetzt so logisch, dass mein connect nicht klappt, aber deins?

*mir* ist das logisch, weil:
bei mir läuft ein mysqlserver auf port 3307, der auf 127.0.0.1 horcht und auf sonst nix. da per default das socket verwendet wird und durch das newline der hostname ignoriert wird, kann der connect nicht klappen.

bei dir klappt der connedt, da es bei dir ja eh das default socket gibt. deine host-angabe wird auch ignoriert, warum lässt du sie dann nicht einfach weg?
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
Antworten mit Zitat

View full thread Database Handle zerstört