Skip to main content

Posts

Showing posts with the label MySQL

Couldn't execute 'show fields from `association`'

Encountered this error while taking mysql dump mysqldump: Couldn't execute 'show fields from `association`': Can't create/write to file '/tmp/#sql_647f_0.MYI' (Errcode: 2) (1) Reason : Can’t find tmp location to save it’s files OS :  centos Solution : Step I Open my.cnf (in this case it was at the location /etc/my.cnf). Step II Under [mysqld] add one more parameterad as : tmpdir=/var/tmp that solved the problem Usually mysql uses /tmp or /var/tmp or /usr/tmp for storing it’s variable but if it doesn’t then try the above method.

MySQL : can't rmdir './demo/' errno 17

Problem : "can't rmdir './test/' errno 17"   Error comes while dropping a database. Reason : For maintaining the data present in the databases MySQL maintains directory. These directories have same name as the database name. While executing the "drop database demo;" command for dropping the database if it's not able to delete it's directories then it throws the above exception Solution : This issue can be solved by manually deleting the database data related directory from the installed directory. Where is the data directory present for MySQL database in windows ? The default location of this directory would be : C:\Program Files (x86)\MySQL\MySQL Server 5.0\data Inside data directory you will see folders present for all the databases, in my case it is 'demo' folder. Deleting this folder solves my problem.