Declaring and using MySQL varchar variables

This works fine for me using MySQL 5.1.35: DELIMITER $$ DROP PROCEDURE IF EXISTS `example`.`test` $$ CREATE PROCEDURE `example`.`test` () BEGIN DECLARE FOO varchar(7); DECLARE oldFOO varchar(7); SET FOO = ‘138’; SET oldFOO = CONCAT(‘0’, FOO); update mypermits set person = FOO where person = oldFOO; END $$ DELIMITER ; Table: DROP TABLE IF EXISTS … Read more

MySQL pid ended (cannot start mysql)

I have the same problem when installing mysql newest version mysql-5.6.10-osx10.7-x86.dmg for my MAC OS 10.7.5. Following is my solutions. First , delete the mysql installed sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* sudo rm -rf ~/Library/PreferencePanes/My* sudo rm -rf /Library/Receipts/mysql* sudo rm -rf /Library/Receipts/MySQL* sudo rm … Read more