-
Notifications
You must be signed in to change notification settings - Fork 0
Mysql
Thierry Lam edited this page Oct 20, 2023
·
7 revisions
sudo apt-get install mysql
- If the
mysql
database is not created, a root password need to be set. Runmysql_secure_installation
and set a password for root. grant all privileges on *.* to 'someuser'@'localhost' with grant option;
- Symlink the
mysql
under/usr/local/
- Add
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
to.bash_profile
- Download and install MySQL-python
Running triggers from mysql cli or Sequel Pro:
DROP TRIGGER my_table_update
DELIMITER $$
CREATE TRIGGER my_table_update BEFORE UPDATE ON my_table
FOR EACH ROW
BEGIN
IF (OLD.name != NEW.name) THEN
SET NEW.update=1;
END IF;
END$$
DELIMITER ;