Category Archives: MySQL



Replace String In MySQL Posted by in MySQL | 1 Comment

MySQL supports replace() function which returns the string input_str with all occurrences of the string from_string replaced by the string to_string. REPLACE() performs a case-sensitive match when searching for from_string. Continue reading

Where MySQL Data Dir And Innodb Data Home Dir Location Posted by in MySQL | Leave a comment

I’m going to move my current MySQL server to another server so I have to backup all my current databases. One important step I need to do is check to see how data files for both MyISAM and InnoDB Storage Engines are stored by taking a look at the datadir and innodb data home dir Continue reading

Tips For Tuning And Optimizing Mysql On Low Memory Dedicated Server Or VPS Posted by in MySQL | Leave a comment

Not all of us has chance or money to play with a professional dedicated server or virtual private server (VPS) so a cheap plan with low memory (216 ~ 512 MBs) is a not bad plan in order to start … Continue reading

How To Tune And Optimize MySQL Performance With MySQLTuner Posted by in MySQL | 1 Comment

MySQLTuner is a Perl script that helps to analyzes your current MySQL configuration and give some recommendations to adjust your settings to increase the performance and stability. Continue reading

Schedule Backup And Zip MySQL Database In Windows Posted by in MySQL | 4 Comments

Creating a job to schedule backup databases automatically is a very important task for each database administrator. Database is always irreplaceable and is the heart of all online business therefore this process must be the first thing in the process of database administrating to ensure it’s super safe. Continue reading

Free Mysql Profiler similar to Microsoft SQL Server Profiler – LogMonitor Posted by in MySQL | 1 Comment

It’s good idea to monitor or log all SQL Queries to your MySQL Database. There is a simple way and tool to trace all MySQL activities similar to Microsoft SQL Server Profiler. This is great stuff for both developers and database administrators to debug, troubleshoot and deeper understand which SQL commands are submitted to your MySQL database. Continue reading

Change or reset MySQL Root Account Password Posted by in MySQL | 2 Comments

If you want to change,update or reset your MySQL account (ex: Root) password under Microsoft Windows and Unix Environment including Ubuntu, Debian, CentOS, Fedora, RedHat, Arch Linux, SUSE, … you can use MySQL command, phpMyAdmin or mysqladmin command Continue reading

Mysql restore database from dump file with GZIP compression Posted by in MySQL | 1 Comment

To restore your mysql database from dump file, specially with large backup file, you should do it from shell command in unix/linux or command prompt in Windows by using mysql command. Continue reading

MySql backup database with gzip compression Posted by in MySQL | 5 Comments

This example will help you know how to backup one or multi MySQL database using mysqldump command. If your database is very big, you may need to compress the backup sql file. To do that, you can use gzip compression to pipe the output to gzip then you will get the output as gzip file. Continue reading

Mysql select current date, current time, current TIMESTAMP example Posted by in MySQL | Leave a comment

Here you go: 1. Current Date: SELECT current_date; 2. Current Time: SELECT current_time; 3. Current TIMESTAMP: SELECT CURRENT_TIMESTAMP;