Search code examples
mysqlmacosxamppmacos-sierra

XAMPP MySQL Startup fails on MacBook Air (MacOS Sierra 10.12.2)


I was downloading XAMPP v7.0.13-0 yesterday, and I had this problem where MySQL MariaDB wouldn't start, I am not sure why it wouldn't, I have tried to run the application from the `MacOS Terminal.app

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

It results in error:

Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
Starting MySQL
.
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
2016-12-21 22:33:01 2727 mysqld_safe Logging to '/Applications/XAMPP/xamppfiles/var/mysql/localhost.local.err'.
..
ERROR!

The log file from XAMPP looks like this:

2016-12-21 22:24:59 2189 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
Warning: World-writable config file '/Applications/XAMPP/xamppfiles/etc/my.cnf' is ignored
2016-12-21 22:24:59 140735798543296 [Note] /Applications/XAMPP/xamppfiles/sbin/mysqld (mysqld 10.1.19-MariaDB) starting as process 2258 ...
2016-12-21 22:24:59 140735798543296 [Warning] Setting lower_case_table_names=2 because file system for /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: The InnoDB memory heap is disabled
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-12-21 22:24:59 140735798543296 [Note] InnoDB: Using SSE crc32 instructions
2016-12-21 22:24:59 140735798543296 [ERROR] mysqld: Can't create/write to file '/var/folders/11/hxbjwwm94txfzqw5mt_yj_x40000gn/T/ibS5h9p3' (Errcode: 13 "Permission denied")
2016-12-21 22:24:59 7fff9b4783c0  InnoDB: Error: unable to create temporary file; errno: 13
2016-12-21 22:24:59 140735798543296 [ERROR] Plugin 'InnoDB' init function returned error.
2016-12-21 22:24:59 140735798543296 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-12-21 22:24:59 140735798543296 [Note] Plugin 'FEEDBACK' is disabled.
2016-12-21 22:24:59 140735798543296 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-12-21 22:24:59 140735798543296 [ERROR] Aborting

2016-12-21 22:24:59 2189 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/localhost.local.pid ended

And I have no clue how to resolve this error. I have restarted the OS several times and made sure there is no instances already running.

Please help!

EDIT
I just reinstalled XAMPP, now the log is a bit different:

2016-12-21 22:54:49 5687 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
2016-12-21 22:54:50 140735798543296 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2016-12-21 22:54:50 140735798543296 [Note] /Applications/XAMPP/xamppfiles/sbin/mysqld (mysqld 10.1.19-MariaDB) starting as process 5833 ...
2016-12-21 22:54:50 140735798543296 [Warning] Setting lower_case_table_names=2 because file system for /Applications/XAMPP/xamppfiles/var/mysql/ is case insensitive
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: The InnoDB memory heap is disabled
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Using SSE crc32 instructions
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Completed initialization of buffer pool
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Highest supported file format is Barracuda.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: 128 rollback segment(s) are active.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Creating zip_dict and zip_dict_cols system tables.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: zip_dict and zip_dict_cols system tables created.
2016-12-21 22:54:50 140735798543296 [Note] InnoDB: Waiting for purge to start
2016-12-21 22:54:50 140735798543296 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.32-79.0 started; log sequence number 1762733
2016-12-21 22:54:50 123145331998720 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-12-21 22:54:50 140735798543296 [Note] Plugin 'FEEDBACK' is disabled.
2016-12-21 22:54:50 140735798543296 [Note] Server socket created on IP: '::'.
2016-12-21 22:54:50 140735798543296 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 48: Address already in use
2016-12-21 22:54:50 140735798543296 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2016-12-21 22:54:50 140735798543296 [ERROR] Aborting

2016-12-21 22:54:52 5687 mysqld_safe mysqld from pid file /Applications/XAMPP/xamppfiles/var/mysql/localhost.local.pid ended

ANSWER: There was an instance of AppleDB which was a default for Apple Developer Version (for SierraOS), I contacted Apple Support and I was told to search up /private/dev/.adb/app.plist and delete it.

After deleting the plist file they told me to navigate to /private/.databases/ and remove .StartDBOnStartup. After rebooting my mac it worked and the port was not used anymore.

I am not quite sure what instance it was, but it did not show in the terminal, no matter what.


Solution

  • There are few command on the terminal. When you start your mamp you should see error messages.

    Look up unix command. I think it's netstat combined or pipe which you might call it.

    I believe you can assign ports in the mamp control panel. There are many ways you can install a mysql php and apache on osx.

    You can use mamp. You can manually install them with macports.

    If you have just purcahsed your macbook you should be able to download xcode and I believe you should be able to install xcode which will allow you to install them with mac ports command line.

    Look at the documentation online. Just follow the instructions, you should be ok.

    do you have other apps installed such as skype which can conflict with mysql port. you can manually assign mysql port.

    try to see what's using port 3306. you need to find that app and uninstall it before someone gets a hold of your pc and starts it back up again.

    this has happened to my servers on amazon aws. i spent weeks fixing it. this even happened to my friends pc. i believe he had his college friend trying to teach him how to install a lamp stack without any prior experience and we spent weeks fixing it.

    i think you fuzzed up your innodb tables. you may need to delete your /var/lib/mysql tables after backup and try to restart mysql.

    if i were you, i would reinstall osx and start from scratch. i did this before, it takes a very long time.

    you should tarball your source and backup tables and reinstall everything on your personal computer.