XAMPPErrorDomain error 1 for changing MySQL data dirs
Solution 1
Look in your logs: apache friends - xampp for linux faq >> Error 1
Solution 2
I also have this problem but none of them works, I compared with files one by one on new machine and the old ones finally find the this works for me:
sudo chown -R nobody:admin /Applications/XAMPP/xamppfiles/var/
Solution 3
Same error. Easily resolved on Mac OSX by changing permissions of the Xampp folder in applications to allow read&write access !
Solution 4
I found a tip elsewhere that says to run:
> sudo ${XAMPP_HOME}/xamppfiles/bin/mysql.server start
I did, and the result was interesting:
> sudo ${XAMPP_HOME}/xamppfiles/bin/mysql.server start
Password:
sudo: /xamppfiles/bin/mysql.server: command not found
Thus ${XAMPP_HOME}
is undefined.
So I edited ~/.bash_profile
and added the line:
export XAMPP_HOME="/Applications/XAMPP"
After restarting Terminal, our command now yields:
Starting MySQL
. ERROR! Manager of pid-file quit without updating file.
Not sure what to do at this point, but it’s progress.
Update: I looked in /Applications/XAMPP/xamppfiles/var/mysql
and noticed a .err file (should start with your local computer name, like johns-macbook-pro.local.err
). It indicated that my permissions were screwed up: “The error means mysqld does not have the access rights to the directory. File name ./ibdata1”
Setting /Applications/xampp/xamppfiles/var/mysql/
and all its contents to be readable and writable for everyone did the trick. Probably the best solution is to chown -R mysqld /Applications/xampp/xamppfiles/var/mysql/
.
Related videos on Youtube
Petruza
General software engineer, golang advocate, also typescript, C, C++, GDScript dev. Interested in emulation, video games, image processing, machine learning, computer vision, natural language processing, web scraping.
Updated on September 17, 2022Comments
-
Petruza over 1 year
I tried to move my mysql data dir from one disk to another, I modified the
datadir
parameter inmy.cnf
, but when XAMPP, and more precisely, MySQL starts, this error is displayed and MySQL doesn't run.Operation could not be completed. (XAMPPErrorDomain error 1.)
What's the problem here? I correctly specified the new path.
-
Petruza over 14 yearsThanks, although my error log says nothing about it. Mine is in "Applications/XAMPP/xamppfiles/logs/error_log"
-
markratledge over 14 yearsTry the mysql logs; they may be in different places. (MySQL docs say they're not available in Console.) See serverfault.com/questions/42531/where-is-my-mysql-log-on-os-x And last resort, check that link above for an email for help with that error.
-
Petruza over 14 yearsThanks, in the end I realized looking at the logs, that mysqld was not using the datadir from my.cnf but instead was following a symbolic link in '/Applications/XAMPP/xamppfiles/var/mysql' pointing to the old data dir. Changed that and it worked, of course. Thanks!
-
Alan H. about 13 yearsPetruza, any more information or details on what you needed to do to clear this error?
-
rtf over 11 yearsReading this is an answer to the question doesn't really make sense.
-
Kai Mattern over 11 yearsEspecially if you just copied back a backup from another machine. Worked for me, too.