MySQL: ‘Access denied for user ‘root’@’localhost’ (using password: YES)’

The above error message most likely occurs when users change password in one environment (via command line or phpmyadmin) and do not see the changes reflect in other OR if they have forgotten the password that is being set for the environment in question.

Following command should help you set/change MySQL password

$ mysql -u root -p
Continue Reading…


MySQL: How to stop, start or restart mysql?

In linux, following commands are used to start/stop/restart mysql

$/etc/init.d/mysqld start
$/etc/init.d/mysqld restart
$/etc/init.d/mysqld stop

In windows, mysql runs as a service.
C:> net stop mysql
C:> net start mysql


Linux: Case sensitive MySQL table names

When transitioning MySQL database from Windows to Linux, users often encounter issues related to case-sensitiveness. Windows is case-insensitive and Linux is case-sensitive.

In such scenarios when a database call is made after the application migration happens, users often run into errors which can send them in circles between the migration servers.

Solution to this problem is to add a single line of text under my.cnf (MySQL configuration file) under [mysqld] Continue Reading…


MySQL: Default collation latin1_swedish_ci (swedish case insensitive)

When new fileds are created as variable characters they get stored as latin1_swedish_ci as default. To change the default collation users will have to manually select the collation of their choice from the mysql admin interface such as in the case of phpmyadmin or will have to denote it in sql queries.

To make a specific collation as the default, other option to give mysql an indication of it by having the needed collation name in my.cnf (mysql configuration) as shown below

Edit my.cnf:
[mysqld] collation_server=latin1_general_ci
Continue Reading…


MySQL Database Error: Error 28 from Storage engine

Reason for the error is the availability of space allocated to the MySQL database in the specified partition.

Easy fix for this is to go to the PhpMyAdmin interface (via CPanel/WHM) and identify the tables which has some value in under overhead column. Select ALL those tables and choose the option “Repair table” after you ensure that there is enough space in the database.


MySQL GUI tool for Data Management

HeidiSQL – a comprehensive tool for MySQL management which is available for Free.

Manage data tables, export/import databases, synchronise tables between databases, integrity check, database backup service management, edit database content and many more features packaged as a solution for ALL your MySQL needs.

This runs on windows platforms – WinXP/XP7 and you can download HeidiSQL from Download link
Continue Reading…


Backup Types

Full backup
Full backup is process of backing up ALL data.
First step towards all other types of backup
Backup time will be longer
Restore operation takes less time

Differential backup
Differential backup is the process of backing up data that has changed since the last FULL backup.
Requires file maintenance as the backup file will be of similar size or larger than its previous backup
Longer backup time than incremental backup
Faster restoration than incremental backup

Incremental backup
Incremental backup is the process of backing up data that has changed since the last Full, Incremental or Differential backup
Takes lesser backup time as it will have small data to archive
Takes longer restoration time

Mirror backup
Mirror backup is similar to full backup and is a direct copy of the files/folders
Files are not compressed in zip files and are not protected with password. They remain the mirror or exact copy of the source.


How to import mysql dump (.gz or .sql) into a database?

When moving mysql database from one server to another or, to test that the data backup works as expected we need to import mysql dump file in the testing environment.

Create the database (test-database) in the testing environment and identify the location of the .gz or .sql file.

If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing
$ gunzip mysqldump.sql.gz

This will uncompress the .gz file and will just store mysqldump.sql in the same location.
Continue Reading…


Ubuntu: Configure PHPMyAdmin in Simple Steps

$ sudo apt-get install phpmyadmin

For versions 7.10 and up, choose “Apache 2” from the screen “Configuring phpmyadmin”

If everything goes fine, you can access phpmyadmin from

If you have created users in MySQL, you can use those credentials to log into the database. The basic admin account is “admin” with no password.

Phpmyadmin defaults to requiring you to login after 1800 seconds of inactivity.

» MySQL Create User, Grant Rights


MySQL: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Reason why this error might occur:

i) Incomplete MySQL implementation
ii) MySQL setting mis-configuration


root@myserver:/# vi /etc/mysql/my.cnf

Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces
#bind-address =

root@myserver:/# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 17785/mysqld

Note that above line which indicates MySQL listening on all interfaces.

Kurinchi Calendar
September 2018
« Oct