Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for mysql

MySQL: max_allowed_packet

Und schon wieder ein MySQL Post. Wenn der Import eines Datenbankdumps mit der Fehlermeldung “Got a packet bigger than ‘max_allowed_packet’ bytes” abbricht, hilft folgendes:

// login
mysql -uxxx -pxxx
// run these commands
set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;

MySQL: ORDER BY conditions

Gut zu wissen:

To get the sorting in the order you want, use your conditions in the ORDER BY, but use DESC after them.

SELECT *
FROM person
WHERE (condition1 OR condition2 OR condition3)
AND maintable.status = static
ORDER BY
 condition1 DESC,
 condition2 DESC,
 condition3 DESC

Also z.B.

SELECT *
FROM person
WHERE (Country = 'de' OR Country = 'es' OR Country = 'fr')
AND maintable.status = static
ORDER BY
 Country = 'de' DESC,
 Country = 'es' DESC,
 Country = 'fr' DESC

MySQL: Got a packet bigger than ‘max_allowed_packet’ bytes

Beim Versuch ein 8MB Datenbank Dump zu Importieren streikte mein MySQL Server heute:

ERROR 1153 (08S01) at line 356: Got a packet bigger than 'max_allowed_packet' bytes

Eine Lösung habe ich im MySQL Forum gefunden:

Zwei Terminal Fenster öffnen. Im ersten Terminal mit der Datenbank verbinden und folgende Befehle absetzten:

set global max_allowed_packet=1000000000;
set global net_buffer_length=1000000; 

Im zweiten Terminal Fenster den Import Befehl absetzen:

mysql -uUSER -p DATABASE < sqldump.sql

Drupal: Convert MyISAM to InnoDB

Drupal 7 wird InnoDB statt MyISAM verwenden. Auf Higher Visibility zeigt ein Post wie man die Konvertierung bestehender Drupal 5 und 6 Installationen angeht, denn

…we are going to just skip over a lot of that apprehension and get down to point of this article - there’s no good reason not to hop right into using InnoDB today on your Drupal 5 or Drupal 6 site. The rewards are; a possibly significant improvement in performance, a definite improvement in scalability, and you’ll start getting used to working with what will be more and more common in your Drupal-life, InnoDB.



Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.