Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 MYSQL


  Multi-master,NoSQL and MySQL

The MySQL family has been innovating rapidly. New features need names and sometimes those names are confusing. Describing something as multi-master or a NoSQL solution has confused me.Multi-master requires one of conflict prevention, conflict resolution or faith. MySQL Cluster provides both conflict prevention and resolution as described in these great posts. Regular MySQL has minimal support for conflict prevention (auto-increment-offset can prevent insert conflicts) and thus requires faith that the application does the right thing. Regular MySQL gets conflict pr...

2,895 0       COMPARISON MYSQL NOSQL RANT MASTER


  Run MySQL on Command Line in Windows

Sometimes if we want to run MySQL but we don't have phpMyAdmin installed. What should we do?On Windows we can run MySQL in following steps:Open Console Window->Type "mysqld -u root". This means we start the mysql server with username root. This program will handle all the communications between our console window and the actual data;After starting the server, we need to use a client to connect to the server and communicate with it. the mysql program is right for this. Next in the command console, we type "mysql -u root -p" to connect the server. By default, after the installation,the defaul...

8,153 0       WINDOWS MYSQL COMMAND LINE CONSOLE DEFAU


  Create trigger in MySQL

To create trigger in MySQL, the syntax is :CREATE [DEFINER = { user | CURRENT_USER }] TRIGGER trigger_name trigger_time trigger_event ON tbl_name FOR EACH ROW trigger_bodyOne example is :DELIMITER %%DROP TRIGGER IF EXISTS delete_commentCREATE TRIGGER delete_comment AFTER DELETE ON file_generate_infoFOR EACH ROW BEGIN DELETE FROM article_comment WHERE article_id=OLD.article_id;END%%The whole create trigger statement should be complete statement but not many separate commands. So we use %% as the statement delimiter. You can choose other symbols as delimiter as well....

2,218 0       MYSQL TRIGGER DILIMITER PHPMYADMIN