This will be a tutorial for setting up your own LEMP stack on Debian 7 Wheezy. This might be also used for installing one on Ubuntu but is not guaranteed.
LEMP is almost the same with a LAMP stack but the Web server part is replaced with Nginx. LEMP is an acronym for a software bundle of Linux, Nginx(for E), MySQL and PHP. Sometimes any of this softwares gets replaced like MySQL can sometimes be replaced with MariaDB and PHP either Perl or Python. Continue reading
This will be a tutorial for setting up your own LAMP stack on Debian 7 Wheezy but this might also work for Ubuntu but is not guaranted.
What Is LAMP?
LAMP is an acronym for a software bundle that is Linux, Apache, MySQL & PHP. There are already available installer for this software stack like XAMPP which can be easily installed but if you want to setup your own LAMP stack using Debian aptitude then please read on. Continue reading
Ever had an experience where you needed to rename a handful of table name into upper case. Below is a procedure to rename all tables into upper case in the current MySQL database/schema.
DROP PROCEDURE IF EXISTS `PROC_TABLE_NAME_TO_UPPER_CASE`$$
CREATE PROCEDURE `PROC_TABLE_NAME_TO_UPPER_CASE`()
DECLARE tbname TEXT DEFAULT ;
DECLARE no_res INT DEFAULT 0;
DECLARE cur CURSOR FOR
FROM information_schema.tables t
WHERE t.table_schema = DATABASE() AND t.table_type=BASE TABLE;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_res = 1;
FETCH cur INTO tbname;
IF no_res = 1 THEN
SET @s = CONCAT(RENAME TABLE `, tbname , ` TO ` , UPPER(tbname), ` );
PREPARE stmt FROM @s;
Just run the script and call it using
then it will rename the tables. Be reminded though that you need to specify the database to be used before connecting to MySQL or by using the use command.