Affichage des articles dont le libellé est mysql. Afficher tous les articles
Affichage des articles dont le libellé est mysql. Afficher tous les articles

mardi 4 mai 2010

Utilisation des curseurs dans Mysql


DELIMITER |
CREATE PROCEDURE updateTable()
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE description_population_type2 TEXT;
DECLARE nom_monentite_type2 CHAR(50);
DECLARE cur1 CURSOR FOR select nom_monentite, description_population from sp_monentite where id_gp=2;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN cur1;
REPEAT
FETCH cur1 INTO nom_monentite_type2, description_population_type2;
IF NOT done THEN
UPDATE sp_monentite
SET description_population = description_population_type2
WHERE nom_monentite_type2=nom_monentite AND id_gp=1;
END IF;
UNTIL done END REPEAT;
CLOSE cur1;
END|


Procédure stockée

jeudi 7 janvier 2010

Mysql en case insensitive sur linux Red hat

Dans le fichier my.ini, sous la section mysqld, ajouter la ligne suivante :

lower_case_table_names=1

mercredi 2 décembre 2009

Install Mysql from the zipped installation

Customize a MySQL installation from a zip file is easy :

Look in the configuration file and set the path in it correctly.


"D:\myproject\MySQL\MySQL Server 5.1\my.ini


Once done, you can set it up as a windows service using the simple command line


"D:\myproject\MySQL\MySQL Server 5.1\bin\mysqld.exe" --install
"D:\myproject\MySQL\MySQL Server 5.1\bin\mysqld.exe" --remove


Change the root password



mysqladmin -u root password NEWPASSWORD

mardi 11 décembre 2007

Mysql connection refused Mandriva

Comment rendre disponible la connexion reseau de mysql sur une mandriva (Connection refused error)
Dans le fichier /etc/sysconfig/mysqld
Commenter MYSQLD_OPTIONS="--skip-networking"