MAMP:
- Stop the MAMP Server if it is running.
- Use a texteditor to create a file named "my.cnf" and save it to the "/Applications/MAMP/conf/" folder.
- Add the following lines into the file:
[mysqld]
default-storage-engine = InnoDB - Save the file and close your editor.
- Start the MAMP servers.
- Start MAMP PRO.
- Stop the MAMP PRO server if it is running.
- Select File -> Edit Template -> MySQL my.cnf
- An editor window appears.
- If a warning message appears confirm with OK.
- Find the section "[mysqld]"
- Beneath the last line of this section add this line:
default-storage-engine = InnoDB - The section "[mysqld]" now looks like this:

- Save (Apple + S) all changes made on "my.cnf"
- Close the editor window (Apple + W)
- Start the MAMP PRO servers.
How-to check if the modifications succeeded. Servers of MAMP / MAMP PRO must be running.
- Open Terminal (Applications/Utilities)
- Enter the following line into the terminal and hit Enter:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot - Enter the following line into the MySQL prompt and hit Enter:
USE information_schema; - Enter the following line into the MySQL prompt and hit Enter:
SELECT * FROM engines; - A table with the storage Engines of MySQL will show up. Inside the Support column "InnoDB" now has the value "DEFAULT". InnoDB now is the default Storage Engine of the MySQL Server.

- Enter the following line into the MySQL prompt and hit Enter:
exit;

Adding this command made my whole system crash and now phpmyadmin will not come up at all when I try to select it from my MAMP dashboard. Are you sure the syntax is correct? I also tried editing the cnf doc to un-comment the options located under "If you use InnoDB you can un-comment these options". That made no difference, except that according to the logs it trashed it even worse. Very frustrating. I am using the latest version of MAMP as of this date.
ReplyDeleteError: Could not connect to MySQL server!
ReplyDeletePlease Help
@Anonymous:
ReplyDeleteIt sounds like you are using a sample cnf file that comes with MySQL. Try creating a new file with the two lines given above and of course, make sure the servers are off before doing this. You may also need to clear your browser cache. I can attest that the above instructions work. Good luck.
Are these instructions still valid for mamp 2.0.2? I see that in the cnf file there is stuff dealing with innodb that is commented out, should that be uncommented as well?
ReplyDeleteMAMP PRO 1.7.1
ReplyDeleteAdded to [mysqld]
default-storage-engine = InnoDB
at the bottom
but bind-address = 127.0.0.1
is not there which I did *not* add.
Restarted MAMP - seems to be OK. MySQL log shows:
InnoDB: Started;
but when I go into terminal I don't find table:
engines
Am I ... 1) running too old a version and about to enter into pain world, or 2) OK and InnoDB is up?
(BTW kudos to the MAMP crew. Great work and will be updating soon)
+---------------------------------------+
| Tables_in_information_schema |
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| KEY_COLUMN_USAGE |
| PROFILING |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| STATISTICS |
| TABLES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
+---------------------------------------+
17 rows in set (0.00 sec)
Working just fine, in Mamp 2.1.1 .. Beautiful solution, thank you! --Jen D.
ReplyDeleteWorks great, thank you!
ReplyDeleteWhen following the instructions for checking that the change was successful,
ReplyDelete"/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot"
I get this message on the terminal,
"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"
What do I need to do differently to get the MySQL command prompt as described above?
Thanks.
Your skills are very good and you also have a sense of humor of understanding the audiance with in the things you write. Well think discount coupons are distributed on regular basis to consumers via saving sites. Thanks for sharing such useful post with us.
ReplyDeleteatlanta roofing