Category: MySQL

XAMPP DB Crash fix

It is possible, I found out a solution: Install new xampp Copy your old database folder from xampp\mysql\data\databasefolder to Paste in your running xampp folder C:\xampp\mysql\data After that stop mysql and apache service then...

MYSQL search through whole database for a certain string.

The code above will generate a procedure called get_table(SEARCH_STRING) , that will accept 1 parameter which is your string. It will search through the whole database server besides these db(information_schema,test,mysql). But if you would...

Mysql Procedure creation

Procedure Creation Example MariaDB [stress]> DELIMITER ;; MariaDB [stress]> CREATE PROCEDURE ABC() -> BEGIN -> WHILE 1 -> DO -> SELECT COUNT(*) FROM stresstable; -> DO SLEEP(1); -> END WHILE; -> END;; MariaDB [stress]>...

MysqlDump without locking Tables

# dumping data without lock table mysqldump -u[USER] -p[PASS] –skip-lock-tables –single-transaction –flush-logs –hex-blob –master-data=2 –max_allowed_packet=1G globe_sdp > globe_sdp_v2.sql

Server & Sql Monitoring (PMM-Server)

Hi, i’ve recently created a pmm-server ( monitoring system for server & mysql ). A pmm-server act as a server and client can connect to pmm-server to look on their information by using the...

mysql replace character

UPDATE game SET g_game_path = REPLACE(g_game_path,”s1.g”,”um”); For the query above, is to update the “game” table , to replace g_game_path’s “s1.g” into “um”

MYSQL INSERT INTO SELECT

To select data from table a to insert into b INSERT INTO ‘DB_NAME’.’TABLE_NAME'(TABLE_FIELD) SELECT ‘FIELDS_TO_INSERT_MUST_BE_TELE_WITH_INSERT_FIELD’ FROM ‘DB_NAME’.’TABLE_NAME’ WHERE (CONDITION);