SitePoint Sponsor

User Tag List

Results 1 to 19 of 19
  1. #1
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Build Your Own Database Driven Web Site Using PHP & MySQL installed MAMP

    Okay, so I followed the directions and the first time all seemed to go okay. Then I had to do other things and now, several weeks later, the MySQL database won't start up. I deleted everything and re-downloaded, re-installed and I still get the same thing. I get as far as opening the terminal and doing the "To add the MySQL command prompt programs that come with MAMP to your Mac OS X system path, follow these instructions:" bit, which seems to be okay (frankly I can't tell, anything in the terminal scares the bejezus out of me), but I can never get past that part... now because the MySQL server won't start.

    What can I do next? It won't even load the webpage where all the settings and stuff are.
    I can't even locate a preferences file to delete.

    Any help would be appreciated, thanks.

    iMac 27" 6.4 GHz Intel Quad Core i7 with OS X 10.7.2

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Hi MitchBentley. Welcome to SitePoint.

    You don't need to use Terminal to manage MAMP. Have you tried just using the main MAMP interface? When I open it, the servers etc. all start up by themselves.

  3. #3
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the terminal part was the adding of extras... according to the set-up instructions. But the real problem is when the main MAMP interface starts up, the Apache server will start but the MySQL will not. So, in answer to your question: yes, I tried it and it doesn't work.
    I don't know how to fix it, where to look, or anything about it other than to follow the instructions in the book, which say nothing about what to do if it doesn't function correctly.

  4. #4
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So, any suggestions out there for when the MySQL won't start up?

  5. #5
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Hi MitchBentley. Welcome to SitePoint.

    You don't need to use Terminal to manage MAMP. Have you tried just using the main MAMP interface? When I open it, the servers etc. all start up by themselves.
    Except that the MySQL does NOT start up automatically... so what now?

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Unfortunately I don't have a lot of experience with this (I pretty much just use MAMP out of the box) so I don't know what to suggest, but I hope someone else can!

    Where in the book does it talk about adding extras? (I keep meaning to read it, but never get the time.)

  7. #7
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Page 22 and 23, immediately following the basic installation it says,

    "Later in this book, you’ll need to use some of the programs that come with the
    MySQL server built into MAMP. To work properly, these programs must be added
    to your Mac OS X system path.
    To add the MySQL command prompt programs that come with MAMP to your Mac
    OS X system path, follow these instructions:"

    It says to open the terminal and then gives pictures of the command lines to type in.
    It does not cover Lion in the book at all.
    Perhaps I was not supposed to do that running Lion?

    At any rate, I am completely stalled and the book is now useless because I can't get anything to work. That means I'll have to build the website I was thinking of using PHP for, in a different way.

    So, I suppose I just have to admit that PHP and databases are beyond me, and move on. I have clients to deal with, so I'll not be working with SitePoint content anymore. This was my first purchase... and now, my last.

  8. #8
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi MitchBentley,

    The most common cause Ive seen for the MySQL server in MAMP failing to start up is another program running on the same computer occupying the MySQL server port. Is it possible you installed MySQL on your Mac separately and it might be running in the background? You might check your System Preferences to see if there is a MySQL icon there, and if so click it and stop that MySQL server from running.

    If you dont have another copy of MySQL running on the same computer, another possible culprit is Skype for Mac. For whatever reason, the brainiacs behind Skype for Mac thought it would be a good idea for the program to use the standard MySQL server port, and as a result running Skype for Mac can prevent MySQL from starting up properly. Try quitting Skype if its running, then see if MAMP is able to starts its MySQL server successfully.

    Good luck!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Babys got backa hard back, that is: The Ultimate CSS Reference

  9. #9
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kevin Yank View Post
    Hi MitchBentley,

    The most common cause I’ve seen for the MySQL server in MAMP failing to start up is another program running on the same computer occupying the MySQL server port. Is it possible you installed MySQL on your Mac separately and it might be running in the background? You might check your System Preferences to see if there is a MySQL icon there, and if so click it and stop that MySQL server from running.

    If you don’t have another copy of MySQL running on the same computer, another possible culprit is Skype for Mac. For whatever reason, the brainiacs behind Skype for Mac thought it would be a good idea for the program to use the standard MySQL server port, and as a result running Skype for Mac can prevent MySQL from starting up properly. Try quitting Skype if it’s running, then see if MAMP is able to starts its MySQL server successfully.

    Good luck!
    Thank you for the reply.
    No, there is no MySQL icon in my preferences. I do not have Skype. I tried quitting Drop Box, Evernote, Little Snitch and Devon Think; none of those seemed to have any effect.
    I did get the window to open in Firefox again and tried to manage MySQL, and got the error: 2002.

    Not sure what to do next.

  10. #10
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Error 2002 simply means that PHP was unable to connect to a running MySQL server, which stands to reason since you cant get MySQL running.

    You can find out why MySQL is failing to start by consulting the MySQL error log. In your MAMP folder (under Applications, usually), look in the logs subfolder. It should contain a file named mysql_error_log.err. Trash that file and then restart MAMP. The file should be created, and any errors that occur in the server startup should be recorded in it. Open the file in TextEdit (or some other text editor), and let me know what you find there.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Babys got backa hard back, that is: The Ultimate CSS Reference

  11. #11
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kevin Yank View Post
    Error 2002 simply means that PHP was unable to connect to a running MySQL server, which stands to reason since you can’t get MySQL running.

    You can find out why MySQL is failing to start by consulting the MySQL error log. In your MAMP folder (under Applications, usually), look in the logs subfolder. It should contain a file named mysql_error_log.err. Trash that file and then restart MAMP. The file should be created, and any errors that occur in the server startup should be recorded in it. Open the file in TextEdit (or some other text editor), and let me know what you find there.
    Okay, you asked for it:

    111219 21:23:22 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
    111219 21:23:22 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
    111219 21:23:22 [Warning] One can only use the --user switch if running as root

    111219 21:23:22 [Note] Plugin 'FEDERATED' is disabled.
    111219 21:23:22 InnoDB: The InnoDB memory heap is disabled
    111219 21:23:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    111219 21:23:22 InnoDB: Compressed tables use zlib 1.2.3
    111219 21:23:22 InnoDB: Initializing buffer pool, size = 128.0M
    111219 21:23:22 InnoDB: Completed initialization of buffer pool
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    111219 21:23:22 InnoDB: Retrying to lock the first data file
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    111219 21:23:24 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
    111219 21:23:25 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
    111219 21:23:25 [Warning] One can only use the --user switch if running as root

    111219 21:23:25 [Note] Plugin 'FEDERATED' is disabled.
    111219 21:23:25 InnoDB: The InnoDB memory heap is disabled
    111219 21:23:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    111219 21:23:25 InnoDB: Compressed tables use zlib 1.2.3
    111219 21:23:25 InnoDB: Initializing buffer pool, size = 128.0M
    111219 21:23:25 InnoDB: Completed initialization of buffer pool
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    111219 21:23:25 InnoDB: Retrying to lock the first data file
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.
    InnoDB: Unable to lock ./ibdata1, error: 35
    InnoDB: Check that you do not already have another mysqld process
    InnoDB: using the same InnoDB data or log files.

  12. #12
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    OK, we can see the problem. For some reason, MySQL is unable to open the MySQL database files for writing. Ive done a bit of Googling on the error message (error: 35) youre getting and have found a couple of potential solutions.

    First of all, there is still a slim possibility that there is a rogue MySQL server running on your system that is holding onto those files. Open Activity Monitor (in the Applications/Utilities folder on your Mac), make sure its set to display All Processes, then use the search box to find any process named mysqld that might be running. If you find one, use the Quit Process button to quit it, and see if MAMP is able to start MySQL now.

    If MySQL really isnt running, the last post in this thread describes how to make sure the file permissions are set correctly on the MAMP folder and all its subfolders so that MySQL is able to gain write access to the database files.

    Hope one of those solves it for you!
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Babys got backa hard back, that is: The Ultimate CSS Reference

  13. #13
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kevin Yank View Post
    OK, we can see the problem. For some reason, MySQL is unable to open the MySQL database files for writing. I’ve done a bit of Googling on the error message (“error: 35”) you’re getting and have found a couple of potential solutions.

    First of all, there is still a slim possibility that there is a rogue MySQL server running on your system that is holding onto those files. Open Activity Monitor (in the Applications/Utilities folder on your Mac), make sure it’s set to display All Processes, then use the search box to find any process named “mysqld” that might be running. If you find one, use the Quit Process button to quit it, and see if MAMP is able to start MySQL now.

    If MySQL really isn’t running, the last post in this thread describes how to make sure the file permissions are set correctly on the MAMP folder and all its subfolders so that MySQL is able to gain write access to the database files.

    Hope one of those solves it for you!
    Well, thanks for all the attempts.
    I checked the running processes as suggested and there is nothing like "mysqld" running.
    I changed the permissions on the main MAMP folder, and mine was read & Write, but not the admin; so I unlocked it, changed the Admin to Read & Write as well and then made all sub-folders have the same permissions and locked it back.

    MySQL will still not start.

    I do appreciate all of your assistance and in such a quick manner, but this is looking like a no-go. Unless you have something else for me to try...
    Cheers,
    Mitch

  14. #14
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,235
    Mentioned
    239 Post(s)
    Tagged
    1 Thread(s)
    Well, I don't have a Mac but in Windows my process is not called mysqld, simply mysql and i had the chance to rename it if I so wish. At this point I would try to uninstall the whole thing and make sure that I don't have any web servers, databases or anything running and try to do a clear install. Probably this will be quicker.

  15. #15
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, this is obviously a waste of everyone's time.
    I have deleted the entire installation. I will no longer bother anyone here.

    Thanks for the input and attempts to help.
    Clearly I need to just stick with simple design stuff and leave PHP to programmers.
    Cheers,
    Mitch

  16. #16
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,235
    Mentioned
    239 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by MitchBentley View Post
    Okay, this is obviously a waste of everyone's time.
    I have deleted the entire installation. I will no longer bother anyone here.

    Thanks for the input and attempts to help.
    Clearly I need to just stick with simple design stuff and leave PHP to programmers.
    Cheers,
    Mitch
    C'mon... don't give up that easily... the thing is that I can't help much with that MAMP install... also with the OS because I use windows and Linux. I never used anything like XAMP, MAMP or LAMP. I did install every software one by one so I can't help with the MAMP installation.

    I can tell you by the message you posted that it looks like your MySQL service may be working. Your message is "Check that you do not already have another mysqld process". That tells me that MySQL should be OK but the connection with PHP may not. I would have to see the configuration PHP file to know if the appropriate stuff is there.

  17. #17
    SitePoint Member
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope - that's it.
    I don't have the time for this now... I could have spent 3 or 4 weeks learning the basics, but it has been longer than that already and I haven't even gotten past page 20 because of this installation. If I were farther along, I could maybe muddle through it, but my client is already asking how the website is going. Clearly, I need to spend my time on what I know how to do and leave this PHP stuff to other more capable programmer types. I am just an artist with some HTML, CSS and basic web experience (and a few copy-paste java tid-bits). This is beyond me as this whole thread has taught me. Too bad, but that's the reality of it. Feel free to delete my profile - I cannot even find a way to do that here!

    I am unsubscribing now and will not be back - thanks again for your time.

  18. #18
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,235
    Mentioned
    239 Post(s)
    Tagged
    1 Thread(s)
    We don't delete accounts (spammers could re-use old names to look legit when they're... spamming!! It would be too confusing). If you don't want to visit the forums anymore, simply don't post. If you think that you may be interested on sharing your experiences, teaching others (or leanring), I think that there are lots of places that you can hang around and we sure welcome your input. Your call

    I'm truly sorry that you couldn't make it work though

    On the positive side, I'm sure that you've learnt something new (even if that is the amount of frustration you can take ).

    Best of luck with your client

  19. #19
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    If you do decide to come back to the book at some stage, you could just work with your code online, using your web host. That's my preference, anyhow, even though it's not the norm.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •