Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-14-2014, 07:49 PM
|
#1
|
Member
Registered: Sep 2004
Location: Wichita, KS
Distribution: Linux Mint 17
Posts: 57
Rep:
|
Moving MySql data folder - can't start service after move.
I recently started to put ownCloud on my Pi and got it working but then decided to move the ownCloud storage and MySQL database to a external hard drive. Mainly to save the flash card from burning out since I was going to be pushing a lot of files around. I found multiple methods of moving the MySQL database online in only a few steps but I can never got the service to start. Below is the errors from the logs. MySQL shows that its a permission issue but even setting up the owner as "chown -R mysql:mysql /media/ownCloud/ownCloudData/mysql" permission is still a issue. I did think AppArmour was to blame but its doesn't look to be installed by default on Raspbian. Any ideas on what I'm missing?
my.cnf
datadir = /media/ownCloud/ownCloudData/mysql
innodb_data_home_dir = /media/ownCloud/ownCloudData/mysql
MySQL error.log
innodb: operating system error number 13 in a file operation
innodb: error means mysqld does not have the access rights to the directory
innodb: File name /media/ownCloud/ownCloudData/mysql/ibdata1
innodb: file operation call: 'create'
syslog
raspberrypi /etc/init.d/mysql[3031]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
raspberrypi /etc/init.d/mysql[3031]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
raspberrypi /etc/init.d/mysql[3031]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
raspberrypi /etc/init.d/mysql[3031]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
|
|
|
07-14-2014, 09:37 PM
|
#2
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
What about the permissions?
|
|
|
07-15-2014, 11:43 AM
|
#3
|
Member
Registered: Sep 2004
Location: Wichita, KS
Distribution: Linux Mint 17
Posts: 57
Original Poster
Rep:
|
I have made sure the owner is MySQL using chown and it is granted r/w.
|
|
|
07-28-2014, 07:16 PM
|
#4
|
LQ Newbie
Registered: Jul 2014
Distribution: openSuse 12.2, SLES11.3, RHEL 5,
Posts: 15
Rep:
|
if you don't use the standard location for the socketfile (/tmp/mysql.sock) you should set "socket=path-to-socketfile" explicitly in your my.cnf both in mysqld AND in client sections, thats where mysqladmin is looking at when connecting from localhost. Otherwise you should provide a --socket=... when invoking a client program. You can find the location in the process string from "ps -ef | grep mysql", if it is set differently.
|
|
|
All times are GMT -5. The time now is 06:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|