I am running mac OS sierra and have more than one installation of MySQL on the machine. One installed manually and the other with Homebrew. I have no problem connecting and using MySQL which I assume is the Homebrew version but I honestly don't know.
I am dealing with a sock error that indicates that the app I am using cannot connect to MySQL (on my local mac) and I have been digging in ever since. The app runs over http and shouldn't have a problem connecting but I am getting the below error that lead me to finding out about two installations of mysql. Makes sense because when I got the machine I installed mysql before becoming hip to homebrew.
Connection Test Failed:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Any ideas how to first determine which is being used by default and then delete the version not being used? Note that the instance running by default connects fine via all the clients I use to manage my local databases.
Update: There is a folder inside Cellar /usr/local/Cellar/mysql/5.6.25 and then there is another version in /usr/local/var/mysql/ which is the one where all my databases are.
mysqld stop renders the following errors and leads me to believe that mysqld is controlling the version of MySQL I would like delete:
$ mysqld stop
2017-05-04 18:44:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-05-04 18:44:54 0 [Note] mysqld (mysqld 5.6.25) starting as process 1718 ...
2017-05-04 18:44:54 1718 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2017-05-04 18:44:54 1718 [Note] Plugin 'FEDERATED' is disabled.
2017-05-04 18:44:54 1718 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-05-04 18:44:54 1718 [Note] InnoDB: The InnoDB memory heap is disabled
2017-05-04 18:44:54 1718 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-05-04 18:44:54 1718 [Note] InnoDB: Memory barrier is not used
2017-05-04 18:44:54 1718 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-05-04 18:44:54 1718 [Note] InnoDB: Using CPU crc32 instructions
2017-05-04 18:44:54 1718 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-05-04 18:44:54 1718 [Note] InnoDB: Completed initialization of buffer pool
2017-05-04 18:44:54 1718 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-05-04 18:44:54 1718 [Note] InnoDB: Check
or log files.
2017-05-04 18:43:41 1635 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35
2017-05-04 18:43:41 1635 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.