can't start mysql56 after move datadir

Murray Eisenberg murrayeisenberg at gmail.com
Thu Feb 12 14:27:40 PST 2015


I should add that for the (re)installation of mysql56, I followed all the steps at https://trac.macports.org/wiki/howto/MySQL with one change: instead of using "load" to start the server, I'm using "mysql.server start".

> On 12 Feb2015, at 5:05 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
> 
> After upgrading from OS X Mavericks to Yosemite, I did the standard procedure for migrating macports. But I found that the mysql server would not start. So I uninstalled mysql56 completely and installed anew. Worked just fine.
> 
> But, I want my datadir to be someplace else from the default, so I edited my.cnf as shown below, then did an _exact_ copy (* preserving permissions *) of /opt/local/var/db/mysql56 to new location ~/Databases/mysql/data, i.e.,
> /Volumes/MacHD/Users/thisuser/Databases/mysql/data.
> 
> When I execute
> 
>   sudo /usr/local/mysql/support-files/mysql.server start
> 
> now I get the dreaded message
> 
>   Starting MySQL
> . ERROR! The server quit without updating PID file (/Volumes/MacHD/Users/thisuser/Databases/mysql/data/MyMachineName.local.pid).
> 
> In MyMachineName.local.err, I see the following:
> 
>  ===== extract from [MyMachineName].local.err ======
> 
> 150212 16:53:28 mysqld_safe mysqld from pid file /Volumes/MacHD/Users/thisuser/Databases/mysql/data/MyMachineName.local.pid ended
> 150212 16:59:05 mysqld_safe Starting mysqld daemon with databases from /Volumes/MacHD/Users/thisuser/Databases/mysql/data
> 2015-02-12 16:59:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
> 2015-02-12 16:59:05 82301 [Warning] Setting lower_case_table_names=2 because file system for /Volumes/MacHD/Users/thisuser/Databases/mysql/data/ is case insensitive
> 150212 16:59:06 mysqld_safe mysqld from pid file /Volumes/MacHD/Users/thisuser/Databases/mysql/data/MyMachineName.local.pid ended
> 
>  ==== end extract =======
> 
> So the mysql server does seem to be using the datadir I specified. And the ownership on this datadir are the same (_mysql:_mysql) as on /opt/local/var/db/mysql56.
> 
> What's wrong?
> 
> Below is my /opt/local/etc/mysql56/my.cnf.
> 
> 
>   ========== begin file my.cnf ===========
> 
> # Use default MacPorts settings
> !include /opt/local/etc/mysql56/macports-default.cnf
> 
> [mysqld]
> datadir = /Volumes/MacHD/Users/thisuser/Databases/mysql/data 
> port = 3306
> socket = /opt/local/var/run/mysql56/mysqld.sock
> 
> sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
> 
> [client]
> socket = /opt/local/var/run/mysql56/mysqld.sock
> 
>    ============ end file =============
> ---
> Murray Eisenberg		murrayeisenberg at gmail.com
> 503 King Farm Blvd #101		Home (240)-246-7240
> Rockville, MD 20850-6667	Mobile (413)-427-5334
> 
> 
> 
> 
> 

---
Murray Eisenberg		murrayeisenberg at gmail.com
503 King Farm Blvd #101		Home (240)-246-7240
Rockville, MD 20850-6667	Mobile (413)-427-5334







More information about the macports-users mailing list