MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: How To Change MySQL Temporary Directory ?  (Read 7316 times)

0 Members and 1 Guest are viewing this topic.

Offline Administrator

  • Chinmay Dingore
  • Administrator
  • Full Member
  • *****
  • Posts: 135
  • Karma: +1/-0
    • View Profile
    • MilesWeb Internet Services Pvt Ltd
How To Change MySQL Temporary Directory ?
« on: April 21, 2014, 05:16:12 PM »
Hi Members,

By default the temporary directory for your MySQL server is set to /tmp folder. When you perform any queries, repair the tables, perform tasks on the database, etc; the temporary files are stored in this directory.

Just in case, if the /tmp partition is running out of space you can either delete these files OR create a new directory with large disk space. Assign this directory as temporary directory for MySQL server.

Open MySQL configuration file in your favorite editor

Quote
vi /etc/my.cnf

Add the line below & save the file.

Quote
tmpdir = /home/mysql-tempdir

Create the folder on your server and set ownership and permissions as below.

Quote
chown mysql.mysql  /home/mysql-tempdir
chmod 1777 /home/mysql-tempdir


Restart MySQL service & you have successfully changes the temporary directory.

Cross check it with the command below.

Quote
mysqladmin variables | grep tmpdir

Feel free to reply this thread if you face any other issues.
MilesWeb.com - Your Hosting, Our Responsibility!
Unlimited Hosting Plans | Managed VPS with 25% Discount

MilesWeb Hosting Forum

How To Change MySQL Temporary Directory ?
« on: April 21, 2014, 05:16:12 PM »