• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

How to chnage the data directory for MYSQL server application

igoldman

Regular Pleskian
Hello ,

The data directory where all the MYSQL databases of my clients are stored is currently on C hard drive

I would like to change it to be another hard drive

lets say I would like to use D hard drive as the hard drived for storing all databases of my clients

how to do that ?
first of all , lets assume that I already have alots of databases in C hard drive and now I would like to move them to another hard drive , what I have to do ? just to copy and paste them to the new data folder in the new hard drive ?

also where I need to configured plesk the place to store the databases of the clients ? and what about configuring the setup file of my sql ?

thank to all who help me
 
You can try to edit: %plesk_dir%\databases\mysql\data\my.ini files and sepcify required data directory.
Then copy database folders there and set appropriate permissions. Restart mysql and enjoj :)
 
Hi , first of all thank you very much about your post ,
I would like to know how to be sure that all the username and password of each database which currently running on my server will not lost and every thing will be fine ?

also what about NTFS permissions ? I need to set something ?

what about telling Plesk that I am going to change the MySQL data folder , I need to chage something in Plesk ?
 
I think existing users and passwords should not disappear. But you can make a backup of client MySQL and also Plesk MySQL.

mysqldump -uadmin -ppassword -P8306 psa > c:\output.txt
to dump Plesk MySQL

mysqldump -uadmin -ppassword -f -A > c:\output.txt
to make dump of all databases within clients mysql.

As for permissions I think they should be the same as to an original folder (mysql\data).

There is no necessary to change anything within Plesk.
 
Back
Top