This forum is no longer active. Please post your questions to our new community site

Forums MAMPStack

Chaning the MySQL data directory

Subscribe to Chaning the MySQL data directory 2 post(s), 1 voice

 
Avatar discopatrick 5 post(s)

Hi all. I’m having some trouble achieving this task.

It seems it should just be a case of:

  • stopping mysql
  • going into my.cnf and changing the datadir= entry
  • moving any database from the old to the new directory
  • starting mysql

However, I’m getting this error from the Bitnami Control Panel:

[15:01] 100129 14:59:39 mysqld_safe Logging to ‘/Applications/mampstack-1.2-0/mysql/data/mysqld.log’.
100129 14:59:39 mysqld_safe Starting mysqld.bin daemon with databases from /Applications/mampstack-1.2-0/mysql/data
100129 14:59:40 mysqld_safe mysqld from pid file /Applications/mampstack-1.2-0/mysql/data/PaddyMac.local.pid ended
/Applications/mampstack-1.2-0/mysql/scripts/ctl.sh : mysql could not be started

…which looks like it’s still looking at the old data directory for some reason.

Is there another place I have to change configuration settings?

 
Avatar discopatrick 5 post(s)

Fixed it.

I also had to edit the file at: /Applications/mampstack-1.2-0/mysql/scripts/ctl.sh

There is a line in it beginning “MYSQL_START” that has a few references to the original directory. The thing that confuses me is there is also a reference to my.cnf in there two. Why not just take the config settings from there?

Forums MAMPStack