web analytics

Category Uncategorized

mysqldump: Got error: 1449: The user specified as a definer (‘user’@’%’) does not exist when using LOCK TABLES

I came across this error while taking the database dump of a database. The database was originally created in another server and transferred to my server after long. When I tried to take a database dump as a part of my backup script, I came across this error.

mysqldump: Got error: 1449: The user specified as a definer (‘edulanche’@’%’) does not exist when using LOCK TABLES

Basically this error is caused by a definer which was created in the previous server but is not present in the new server. The easiest way to get past this error is to go to the original dump file and search for ‘definer’ in it.

/*!50013 DEFINER=`user`@`%` SQL SECURITY DEFINER */

If found, modify it to reflect the root user or database user in your new server.

/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINE...

Read More

Partitioning a new hard disk with parted

Fdisk is undoubtedly the most favorite disk partitioning tool for most linux savy peope. However fdisk has limitations when it comes to disk with space more than 2T. Redhat recommends parted now, starting from RHEL6. fdisk doesnt understand GUID partition table (GPT) and it is not suited for disk bigger than 2T. You will have to use a more advanced tool “parted” for that.

Let us see how a new 3T disk can be partitioned using parted command. I will be showing just 1 partition here, taking up all space rest can be done the same way. Normally, the disk will be labelled msdos, and you need to label it as GPT.

The list command will show you the current disks and their details.

[root@abc ~]# parted –list
Model: ATA ST33000650NS (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B...

Read More

Fatal error: Class ‘Net_SMTP’ not found in /usr/local/lib/php/Mail/smtp.php on line 349″

I was trying to setup a php script to send mail with SMTP Authentication. The script was ready, but when executed in a browser, it displayed the following error.

Fatal error: Class ‘Net_SMTP’ not found in /usr/local/lib/php/Mail/smtp.php on line 349″

The problem appears because the php pear package Net_SMTP is not present in the server. You can install it in two way.

  1. Install the Mail package with –alldeps which will install all required dependencies like Net_SMTP

pear install –alldeps Mail

If Mail is already installed, and if it refuses to get installed then you can force the installation as follows.

pear install –alldeps -f Mail

2.  If Mail is already installed, then you can install the Net_SMTP option alone as follows.

pear install Net_SMTP

After that, execute the script again and...

Read More