mysql - my.cnf changing datadir, 2days and still no luck -


hi have been trying hours upon hours, forum last resort sfter googling hundreds of pages.

problem: sorry length supplying in detail of have tried

i have set mysql , working fine, need change data-storage point @ external hd.

with mac osx there no default my.cnf copied my-huge.cnf /usr/local/mysql-5.1.53-osx10.6-x86/support-files, if makes odds have 'mysql' folder in local also.

when place , rename my-huge.cnf /etc
renamed my.cnf instructed,
works normal if dont add datadir field looks this
datadir= /volumes/elements/database,
have copied old data new location using
sudo cp -r -p /var/lib/mysql /volumes/elements/database

everything workds fine unless add field datadir = /volumes/elements/database my.cnf file, if error

error 2002 (hy000): can't connect local mysql server through socket '/var/lib/mysql/mysql.sock' (2)

my.cnf file looks following

macintosh-100:support-files seanf$ cd /etc  macintosh-100:etc seanf$ sudo nano my.cnf  password:  macintosh-100:etc seanf$ nano my.cnf  macintosh-100:etc seanf$ my.cnf > /desktop/blah.txt  -bash: /desktop/blah.txt: no such file or directory  macintosh-100:etc seanf$ my.cnf < /desktop/blah.txt  -bash: /desktop/blah.txt: no such file or directory  macintosh-100:etc seanf$ nano my.cnf  

gnu nano 2.0.6 file: my.cnf

# example mysql config file large systems.  #  # large system memory of 1g-2g system runs  # mysql.  #  # can copy file  # /etc/my.cnf set global options,  # mysql-data-dir/my.cnf set server-specific options (in  # installation directory /usr/local/mysql/data) or  # ~/.my.cnf set user-specific options.  #  # in file, can use long options program supports.  # if want know options program supports, run program  # "--help" option.   # following options passed mysql clients  [client]  #password = your_password  port = 3306  socket = /tmp/mysql.sock   # here follows entries specific programs   # mysql server  [mysqld]l  datadir = /volumes/elements/database  port = 3306  socket = /tmp/mysql.sock  skip-locking  key_buffer_size = 384m  

etc....

i hope can shed light on this, have assignment due , have spent 2 days trying working on external

also when mysql working , type mysqld errors if issue?

macintosh-100:lib s$ mysqld  101201 13:31:13 [warning] '--skip-locking' deprecated , removed in future >release. please use '--skip-external-locking' instead.  101201 13:31:13 [warning] can't create test file /usr/local/mysql-5.1.53-osx10.6-x86/data>/macintosh-100.lower-test  101201 13:31:13 [warning] can't create test file /usr/local/mysql-5.1.53-osx10.6-x86/data>/macintosh-100.lower-test  mysqld: can't change dir '/usr/local/mysql-5.1.53-osx10.6-x86/data/' (errcode: 13)  101201 13:31:13 [error] aborting   101201 13:31:13 [note] mysqld: shutdown complete   macintosh-100:lib s$  

thanks time hope expert can answer this

though haven't played datadir property i've changed data storage location external hd mounting default location follows:

  • backup current data directory
  • delete data directory
  • mount external hd (mount /var/lib/mysql/data /dev/xxx)

i've done @ ubuntu server. when changing innodb specific directories i've noticed 1 have careful rights (apparmord in case of ubuntu). when mysql cannot perform filesystem operation find error messages misleading. helpful study it's error.log (/var/log/mysql/error.log in case).

hope helps resolve issue asap.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -