Не запускается mamp на windows 10

MAMP is a popular local web development tool. Learn how to troubleshoot your MAMP installation when it's not starting up correctly.

Having a local staging environment available is essential for WordPress developers. MAMP is a popular solution, but some common issues can prevent the platform from running properly.

Fortunately, MAMP users have found fairly simple go-to solutions to these problems, which you can use to get your local stack up and working again. Often, all it takes is a few clicks.

In this article, we’ll review what MAMP is, why it’s useful, and how to find its error logs. Then we’ll walk you through five common resolutions to MAMP not starting. Let’s get right to it!

An Introduction to MAMP

MAMP is one of several popular local development platforms. It turns your computer into a server environment that can host websites while you work on them:

The MAMP home page.

The MAMP home page.

MAMP uses Apache, MySQL, and PHP, making it highly compatible with WordPress. There is a free version available, or you can pay for a proprietary version that includes installers and other features to help you get your first site set up quickly and improve your workflow.

Like all sites hosted locally, your MAMP development or test website will not be publicly available. This enables you to build or test features freely, without worrying about it affecting your front-facing User Experience (UX). It also prevents visitors from stumbling upon your half-completed site.

Plus, local development doesn’t require an internet connection, so you can work from anywhere. Local sites also tend to load faster, which may improve your productivity somewhat. Once you’re finished building or making changes to your site, you can migrate it to a live server.

We’ve covered how to install MAMP in a previous post. At this stage, we’ll assume that you’ve already been using it but have run into a problem.

How to Check Your MAMP Error Logs

Finding your MAMP error logs is quite simple. Just navigate to the folder where your installation is saved and open the logs folder. You should see files for your Apache, MySQL, and PHP error logs:

The MAMP error log files.

The MAMP error log files.

If you’re experiencing problems with MAMP not starting, this should be your first step. Check the logs to see if there are any messages related to the problem and whether they provide specific steps you can take to resolve it. This is much faster than trial and error troubleshooting.

What to Do If MAMP Is Not Starting (5 Top Solutions)

Some common issues MAMP users run into include Apache not starting and MySQL not starting. Either problem will keep the platform from running, making it impossible for you to access your local site. Here are some top solutions that should help you resolve both roadblocks, so you can get back to work.

1. Restore Your Document Root Folder

Your MAMP installation’s document root is where your virtual host’s HTML, PHP, and image files are stored. Suppose you have purposefully or accidentally changed or deleted your document root folder. In that case, you may see an error message reading “Apache couldn’t be started. Please check your MAMP installation and configuration” when you try to launch your server:

Apache couldn’t be started. Please check your MAMP installation and configuration.

Apache couldn’t be started. Please check your MAMP installation and configuration.

To fix this, you simply need to restore your document root folder or tell MAMP where you’ve moved it. This process varies depending on whether you’re using a Mac or Windows machine, in that the file paths might be slightly different. However, you should be able to follow the steps below on either Operating System (OS).

By default, the MAMP document root is located at Applications/MAMP/htdocs on macOS, or C:MAMPhtdocs on Windows. If you know where your new document root folder is, you can open your MAMP configuration file by navigating to Applications (or C:) > MAMP > conf > apache > httpd.conf, and then replacing the default path with the new one.

Once you open httpd.conf, search for mentions of “DocumentRoot” and replace the default path everywhere. Save the file, then stop and restart MAMP.

Alternatively, you can select your new document root via the MAMP control panel. Open the Preferences window and select the Web Server tab:

The MAMP Web Server Preferences.

The MAMP Web Server Preferences.

Make sure Apache is selected. Then, click on the Select button next to Document Root. This will open a Finder window, where you can choose the folder you want to use as the document root.

Click on Select once you’ve chosen the correct folder, then select OK in the MAMP Preferences window:

Confirming the MAMP document root in the Web Server Preferences window.

Confirming the MAMP document root in the Web Server Preferences window.

This will reset your document root and automatically restart MAMP. Apache should then be able to start.

2. Change Your Listening Port

By default, MAMP runs Apache on port 8888. If this port is in use by another application, Apache won’t be able to start.

To fix this problem, you can either quit the application preventing Apache from connecting to port 8888, or change the listening port in your MAMP configuration file.

If you want to discover which app is blocking the port, you can use the command line to do so. The command you need to enter will vary depending on your OS:

  • macOS: sudo lsof -nP -iTCP:$PORT | grep LISTEN
  • Windows: netstat -ab | more

These should return a list of Process Identifiers (PIDs) and the ports they’re running on. You can terminate the process that is running on the port you need in order to start MAMP by using one of the following:

  • macOS: sudo kill -9 <PID>
  • Windows: taskkill /F /PID pid_number

When performing the above commands, make sure to substitute placeholders such as $PORT, <PID>, and pid_number with the appropriate values.

If you want to change the listening port in your MAMP configuration file, you can do so by opening your httpd.conf file and changing all mentions of “port 8888” to “port 8000” (or another alternative). Save the file, then restart Apache.

Additionally, you can change the Apache port in Preferences > Ports:

MAMP port preferences.

MAMP port preferences.

Click on OK to save your changes.

3. Kill All MySQL Processes and Restart MAMP

If your MAMP problems are due to MySQL rather than Apache, there are a few go-to fixes you can try. The issue is usually due to another MySQL service running on the same port.

The easiest solution is to kill all MySQL processes and restart MAMP. On macOS, you can do this using the Activity Monitor, which you’ll find in the Utilities folder on your computer.

Search for “mysqld”, select any processes that are running, and then quit them by clicking on the X button in the top-left corner of the window:

Killing active MySQL processes via the Activity Monitor.

Killing active MySQL processes via the Activity Monitor.

Windows users will need to open the Resource Monitor from the Start menu:

The Windows Resource Monitor app.

The Windows Resource Monitor app.

Search for the mysqld.exe file, right-click on it, and select End Process. Once you’ve quit all MySQL processes on your computer, stop and restart MAMP.

4. Clear Your MySQL Logs

If killing all the active MySQL processes on your computer doesn’t enable MySQL to start, you can try deleting your MySQL log files. These are stored in your MAMP db/mysql57 directory:

The MAMP MySQL log files.

The MAMP MySQL log files.

They should be named ib_logfile0, ib_logfile1, etc. Back up the log files, then delete them and restart MAMP. The log files will automatically regenerate when they’re needed again.

5. Delete the mysql.sock.lock File

MAMP must write Process Identifiers (PIDs) for active processes to a mysql.sock.lock file. If this task fails, the file is left behind instead of being deleted once the process completes.

This will prevent MySQL from starting up, as it treats an empty mysql.sock.lock file the same as one that contains a running PID. To fix this, you’ll need to delete the file manually.

Navigate to your MAMP files (Applications/MAMP on Mac or C:MAMP on Windows) and look for the tmp folder. Then select the mysql folder, search for the mysql.sock.lock file, and delete it. As with the log files, a new mysql.sock.lock file will automatically be created when it’s needed next.

Summary

MAMP is one of the local development solutions for many WordPress professionals and hobbyists (note: it’s not the only one). However, some issues may arise that will prevent your server from starting, and ultimately delay your workflow.

In this article, we walked you through five possible solutions if Apache or MySQL won’t start:

  1. Restore your document root folder.
  2. Change your listening port.
  3. Kill all MySQL processes and restart MAMP.
  4. Clear your MySQL logs.
  5. Delete the mysql.sock.lock file.

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Having a local staging environment available is essential for WordPress developers. MAMP is a popular solution, but some common issues can prevent the platform from running properly.

Fortunately, MAMP users have found fairly simple go-to solutions to these problems, which you can use to get your local stack up and working again. Often, all it takes is a few clicks.

In this article, we’ll review what MAMP is, why it’s useful, and how to find its error logs. Then we’ll walk you through five common resolutions to MAMP not starting. Let’s get right to it!

An Introduction to MAMP

MAMP is one of several popular local development platforms. It turns your computer into a server environment that can host websites while you work on them:

The MAMP home page.

The MAMP home page.

MAMP uses Apache, MySQL, and PHP, making it highly compatible with WordPress. There is a free version available, or you can pay for a proprietary version that includes installers and other features to help you get your first site set up quickly and improve your workflow.

Like all sites hosted locally, your MAMP development or test website will not be publicly available. This enables you to build or test features freely, without worrying about it affecting your front-facing User Experience (UX). It also prevents visitors from stumbling upon your half-completed site.

Plus, local development doesn’t require an internet connection, so you can work from anywhere. Local sites also tend to load faster, which may improve your productivity somewhat. Once you’re finished building or making changes to your site, you can migrate it to a live server.

We’ve covered how to install MAMP in a previous post. At this stage, we’ll assume that you’ve already been using it but have run into a problem.

How to Check Your MAMP Error Logs

Finding your MAMP error logs is quite simple. Just navigate to the folder where your installation is saved and open the logs folder. You should see files for your Apache, MySQL, and PHP error logs:

The MAMP error log files.

The MAMP error log files.

If you’re experiencing problems with MAMP not starting, this should be your first step. Check the logs to see if there are any messages related to the problem and whether they provide specific steps you can take to resolve it. This is much faster than trial and error troubleshooting.

What to Do If MAMP Is Not Starting (5 Top Solutions)

Some common issues MAMP users run into include Apache not starting and MySQL not starting. Either problem will keep the platform from running, making it impossible for you to access your local site. Here are some top solutions that should help you resolve both roadblocks, so you can get back to work.

1. Restore Your Document Root Folder

Your MAMP installation’s document root is where your virtual host’s HTML, PHP, and image files are stored. Suppose you have purposefully or accidentally changed or deleted your document root folder. In that case, you may see an error message reading “Apache couldn’t be started. Please check your MAMP installation and configuration” when you try to launch your server:

Apache couldn’t be started. Please check your MAMP installation and configuration.

Apache couldn’t be started. Please check your MAMP installation and configuration.

To fix this, you simply need to restore your document root folder or tell MAMP where you’ve moved it. This process varies depending on whether you’re using a Mac or Windows machine, in that the file paths might be slightly different. However, you should be able to follow the steps below on either Operating System (OS).

By default, the MAMP document root is located at Applications/MAMP/htdocs on macOS, or C:MAMPhtdocs on Windows. If you know where your new document root folder is, you can open your MAMP configuration file by navigating to Applications (or C:) > MAMP > conf > apache > httpd.conf, and then replacing the default path with the new one.

Once you open httpd.conf, search for mentions of “DocumentRoot” and replace the default path everywhere. Save the file, then stop and restart MAMP.

Alternatively, you can select your new document root via the MAMP control panel. Open the Preferences window and select the Web Server tab:

The MAMP Web Server Preferences.

The MAMP Web Server Preferences.

Make sure Apache is selected. Then, click on the Select button next to Document Root. This will open a Finder window, where you can choose the folder you want to use as the document root.

Click on Select once you’ve chosen the correct folder, then select OK in the MAMP Preferences window:

Confirming the MAMP document root in the Web Server Preferences window.

Confirming the MAMP document root in the Web Server Preferences window.

This will reset your document root and automatically restart MAMP. Apache should then be able to start.

2. Change Your Listening Port

By default, MAMP runs Apache on port 8888. If this port is in use by another application, Apache won’t be able to start.

To fix this problem, you can either quit the application preventing Apache from connecting to port 8888, or change the listening port in your MAMP configuration file.

If you want to discover which app is blocking the port, you can use the command line to do so. The command you need to enter will vary depending on your OS:

  • macOS: sudo lsof -nP -iTCP:$PORT | grep LISTEN
  • Windows: netstat -ab | more

These should return a list of Process Identifiers (PIDs) and the ports they’re running on. You can terminate the process that is running on the port you need in order to start MAMP by using one of the following:

  • macOS: sudo kill -9 <PID>
  • Windows: taskkill /F /PID pid_number

When performing the above commands, make sure to substitute placeholders such as $PORT, <PID>, and pid_number with the appropriate values.

If you want to change the listening port in your MAMP configuration file, you can do so by opening your httpd.conf file and changing all mentions of “port 8888” to “port 8000” (or another alternative). Save the file, then restart Apache.

Additionally, you can change the Apache port in Preferences > Ports:

MAMP port preferences.

MAMP port preferences.

Click on OK to save your changes.

3. Kill All MySQL Processes and Restart MAMP

If your MAMP problems are due to MySQL rather than Apache, there are a few go-to fixes you can try. The issue is usually due to another MySQL service running on the same port.

The easiest solution is to kill all MySQL processes and restart MAMP. On macOS, you can do this using the Activity Monitor, which you’ll find in the Utilities folder on your computer.

Search for “mysqld”, select any processes that are running, and then quit them by clicking on the X button in the top-left corner of the window:

Killing active MySQL processes via the Activity Monitor.

Killing active MySQL processes via the Activity Monitor.

Windows users will need to open the Resource Monitor from the Start menu:

The Windows Resource Monitor app.

The Windows Resource Monitor app.

Search for the mysqld.exe file, right-click on it, and select End Process. Once you’ve quit all MySQL processes on your computer, stop and restart MAMP.

4. Clear Your MySQL Logs

If killing all the active MySQL processes on your computer doesn’t enable MySQL to start, you can try deleting your MySQL log files. These are stored in your MAMP db/mysql57 directory:

The MAMP MySQL log files.

The MAMP MySQL log files.

They should be named ib_logfile0, ib_logfile1, etc. Back up the log files, then delete them and restart MAMP. The log files will automatically regenerate when they’re needed again.

5. Delete the mysql.sock.lock File

MAMP must write Process Identifiers (PIDs) for active processes to a mysql.sock.lock file. If this task fails, the file is left behind instead of being deleted once the process completes.

This will prevent MySQL from starting up, as it treats an empty mysql.sock.lock file the same as one that contains a running PID. To fix this, you’ll need to delete the file manually.

Navigate to your MAMP files (Applications/MAMP on Mac or C:MAMP on Windows) and look for the tmp folder. Then select the mysql folder, search for the mysql.sock.lock file, and delete it. As with the log files, a new mysql.sock.lock file will automatically be created when it’s needed next.

Summary

MAMP is one of the local development solutions for many WordPress professionals and hobbyists (note: it’s not the only one). However, some issues may arise that will prevent your server from starting, and ultimately delay your workflow.

In this article, we walked you through five possible solutions if Apache or MySQL won’t start:

  1. Restore your document root folder.
  2. Change your listening port.
  3. Kill all MySQL processes and restart MAMP.
  4. Clear your MySQL logs.
  5. Delete the mysql.sock.lock file.

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Fyat

Всем привет! Когда я запускаю программу MAMP не запускается Apache и MySQL Сервера, в чем проблема? Когда запускаю MAMP PRO все работает четко, когда запускаю бесплатную версию MAMP ничего не пашет((

5b0c1bbc07f72439155321.jpeg5b0c1bc6333e0019134077.jpeg

Логи ошибок

[Mon May 28 19:23:25 2018] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon May 28 19:23:26 2018] [notice] Digest: generating secret for digest authentication ...
[Mon May 28 19:23:26 2018] [notice] Digest: done
[Mon May 28 19:23:27 2018] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2h mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.2.1 mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations
[Mon May 28 19:23:27 2018] [notice] Server built: May  6 2016 10:19:53
[Mon May 28 19:23:27 2018] [crit] (22)Invalid argument: Parent: Failed to create the child process.
[Mon May 28 19:23:27 2018] [crit] (OS 6)The handle is invalid.  : master_main: create child process failed. Exiting.


  • Вопрос задан

    более трёх лет назад

  • 10258 просмотров

Пригласить эксперта

На Windows как правило ошибка возникает в модуле Perl.

Закомментируй строку: LoadModule perl_module modules/mod_perl.so
в файле C:MAMPconfapachehttpd.conf
и перезапусти Апач.

Кстати при этой ошибке не работает только Апач. Nginx работает.


  • Показать ещё
    Загружается…

07 февр. 2023, в 14:23

15000 руб./за проект

07 февр. 2023, в 14:18

20000 руб./за проект

07 февр. 2023, в 12:54

30000 руб./за проект

Минуточку внимания

I’ve installed MAMP Pro on my Windows 10 Computer this week, and it worked fine until today. I’ve restarted my computer and immediately started MAMP Pro — this caused the MySQL server to start, but not Apache. Then, I restarted MAMP and no server was running, I’ve checked if any other Services were running on the MAMP port but there were none. I also changed the Ports in MAMP but it wasn’t working either.

Why might this be happening?

Here are the Apache logs:

[Sat Oct 21 04:46:43 2017] [warn] pid file C:/MAMP/bin/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Oct 21 04:46:43 2017] [notice] Digest: generating secret for digest authentication ...

[Sat Oct 21 04:46:43 2017] [notice] Digest: done

[Sat Oct 21 04:46:44 2017] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.1.5 

mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations

[Sat Oct 21 04:46:44 2017] [notice] Server built: May  6 2016 10:19:53

[Sat Oct 21 04:46:44 2017] [notice] Parent: Created child process 5348

[Sat Oct 21 04:46:45 2017] [notice] Digest: generating secret for digest authentication ...

[Sat Oct 21 04:46:45 2017] [notice] Digest: done

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Child process is running

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Acquired the start mutex.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting 64 worker threads.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 443.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 443.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 80.

Toastrackenigma's user avatar

asked Oct 21, 2017 at 21:33

Rlz's user avatar

Do the following:
MAMP -> Preferences -> PHP. Change Standard Version 7.3.7 to 7.2.14. Start the servers.
After success, you can return to Standard Version 7.3.7.

answered Oct 17, 2019 at 11:33

Oleksandr Kostian's user avatar

1

I had this same problem, and the only thing that worked for me to get the Apache server started again was to change the PHP version to 7.2.14 in the Preferences area of MAMP:

MAMP > Preferences... > PHP > Standard Version > 7.2.14

Note: After I was able to get the Apache server started again, I tried to change the PHP version back to 7.3.7, but this broke the Apache server startup process again. The green dot would wink on, and then off. So I am leaving MAMP with PHP version 7.2.14 for now (since the version of PHP doesn’t matter to me as long as it is 7.x and not 5.6.x).

answered Feb 17, 2020 at 21:39

JoeCodesStuff's user avatar

A problem might be that the port apache uses is blocked by something else I can’t remember that port but you can easily look that up.

I think
world wide publishing
Usually uses that same port as apache so unrun that and see if it works.

I know you said you checked the ports but world wide publishing is always running by default. So I’d check that.

answered Oct 21, 2017 at 21:42

Justin Battaglia's user avatar

Из прочтения я вижу, что это очень распространенная проблема, и есть 2 рекомендуемых основных решения:

очистить временные файлы; а также проверьте, работает ли другой экземпляр MySQL.

Решение 1. Очистить файлы, которые я очистил ib_logfile0, ib_logfil1 и iddata1. Когда я перезапускаю MAMP, он воссоздает эти файлы, но сервер не запускается.

Решение 2. Закройте другие экземпляры MySWL. Я не могу найти способ проверить, работает ли MySQL еще где-нибудь. Читая вокруг (включая справочный сайт MAMP), я должен использовать диспетчер задач Windows, чтобы найти «MySQLd» и закрыть все запущенные экземпляры, однако Win10, похоже, удалил функцию поиска из диспетчера задач. Просмотр процессов не показал, хотя:

снимок экрана диспетчера задач Windows

Далее я видел людей, добавляющих «innodb_force_recovery = 1» в файл my.cnf. Я искал my.cnf, но не смог его найти. Вместо этого я попытался добавить строку в C:MAMPconfmysqlmy.ini, а также попытался добавить «innodb_force_recovery = 2». Ни один не работал.

Я попытался изменить номер порта, который использует MySQL, на 3307, который тоже не работал.

Наконец, я удалил и переустановил MAMP — не сработало.

Журнал ошибок MySQL гласит:

[Предупреждение] TIMESTAMP с неявным значением DEFAULT устарела. Пожалуйста, используйте опцию сервера —explicit_defaults_for_timestamp (см. Документацию для более подробной информации).

[Примечание] —secure-file-priv установлено в NULL. Операции, связанные с импортом и экспортом данных, отключены

[Примечание] C:MAMPbinmysqlbinmysqld.exe(mysqld 5.7.24-log), начиная с процесса 9044…

У кого-нибудь есть какие-либо идеи?

Я думаю, что было бы полезно, если есть способ проверить экземпляры MySQL, запущенные через командную строку, а затем, если они есть, как закрыть его из командной строки.

Любая помощь будет принята с благодарностью!

Стив

На этой неделе я установил MAMP Pro на свой компьютер с Windows 10, и до сегодняшнего дня он работал нормально. Я перезагрузил компьютер и сразу запустил MAMP Pro — это вызвало запуск сервера MySQL, но не Apache. Затем я перезапустил MAMP, и ни один сервер не работал, я проверил, работали ли какие-либо другие службы на порту MAMP, но их не было. Я также изменил порты в MAMP, но он тоже не работал.

Почему это может происходить?

Вот журналы Apache:

[Sat Oct 21 04:46:43 2017] [warn] pid file C:/MAMP/bin/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Oct 21 04:46:43 2017] [notice] Digest: generating secret for digest authentication ...

[Sat Oct 21 04:46:43 2017] [notice] Digest: done

[Sat Oct 21 04:46:44 2017] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.1.5

mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations

[Sat Oct 21 04:46:44 2017] [notice] Server built: May  6 2016 10:19:53

[Sat Oct 21 04:46:44 2017] [notice] Parent: Created child process 5348

[Sat Oct 21 04:46:45 2017] [notice] Digest: generating secret for digest authentication ...

[Sat Oct 21 04:46:45 2017] [notice] Digest: done

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Child process is running

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Acquired the start mutex.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting 64 worker threads.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 443.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 443.

[Sat Oct 21 04:46:46 2017] [notice] Child 5348: Starting thread to listen on port 80.

0

Решение

Проблема может заключаться в том, что порт, который использует Apache, заблокирован чем-то другим, я не могу вспомнить этот порт, но вы можете легко найти это.

Я думаю
издательство во всем мире
Обычно использует тот же порт, что и apache, поэтому запустите его и посмотрите, работает ли он.

Я знаю, что вы сказали, что проверили порты, но публикация по всему миру всегда выполняется по умолчанию. Так что я бы проверил это.

0

Другие решения

Других решений пока нет …

мой сервер MAMP mysql не запускается. Все предложения, которые я видел в интернете, говорят, чтобы проверить другие запущенные процессы mysqld и убить их, если они существуют, и что это должно исправить проблему, но это не для меня.

вот лог ошибки:

130415 13:42:12 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
130415 13:42:12 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
130415 13:42:12 [Note] Plugin 'FEDERATED' is disabled.
130415 13:42:12 InnoDB: The InnoDB memory heap is disabled
130415 13:42:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130415 13:42:12 InnoDB: Compressed tables use zlib 1.2.3
130415 13:42:12 InnoDB: Initializing buffer pool, size = 128.0M
130415 13:42:12 InnoDB: Completed initialization of buffer pool
130415 13:42:12 InnoDB: highest supported file format is Barracuda.
130415 13:42:13  InnoDB: Waiting for the background threads to start
130415 13:42:14 InnoDB: 1.1.8 started; log sequence number 1707549
130415 13:42:14 [Note] Event Scheduler: Loaded 0 events
130415 13:42:14 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  Source distribution

похоже, что соединение открыто для меня, но MAMP все еще ошибается с этим сообщением: «MySQL не смог начать. Проверьте журнал для получения дополнительной информации.»

какие предложения?

21 ответов


то, что работало для меня, удаляло все файлы (но не каталоги) в MySQL dir.

редактировать #2 согласно ответам ниже, вам нужно только удалить файлы журнала: [ib_logfile0, ib_logfile1]

так выйти из MAMP, а затем в терминале:

rm /Applications/MAMP/db/mysql/ib_logfile* #(or wherever your MAMP is installed)

редактировать!: Несколько человек упомянули, что вы можете сначала создать резервную копию этих файлов, если что-то пойдет не так, поэтому, возможно, просто используйте mv:

mv /Applications/MAMP/db/mysql/*  /tmp/.

Если это не сработает, вернитесь и убейте всех процессы:
sudo killall -9 mysqld

Это также дублируется здесь:
сервер mysql не запускает MAMP



rm /Applications/MAMP/db/mysql56/*

работает нормально, но тогда он показывает «нет базы данных» в phpmyadmin, хотя есть базы данных, поэтому мой drupal дал мне ошибки из-за этого.

все, что мне нужно сделать, это просто удалить два файла ib_logfile0 и ib_logfile1 С /Applications/MAMP/db/mysql56/ и что сделал трюк для меня.


Я посмотрел на сайт MAMP. Идите в MAMP/db / mysql56 и переименуйте оба файла журнала (я только что изменил номер в конце). Вуаля, перезапустил МАМП и все было хорошо.

имена файлов журналов:

  1. ib_logfile0
  2. ib_logfile1

  1. остановить сервер MAMP.
  2. затем перейдите в следующую папку:

приложения / MAMP/db/mysql56/

в этой папке удалите все прямые файлы, кроме папок.
Это означает, что вы должны удалить только auto.cnf, ibdata, ib_logfile, нет никаких папок.

  1. перезапустить сервер MAMP.

это должно сработать.

спасибо.


большинство ответов здесь предлагают удалить случайные файлы.

большую часть времени Это худшее, что можно сделать особенно, если для вас важно сохранить целостность среды разработки.

как объяснено в файле журнала, если эта проблема не связана с разрешением доступа на чтение или с файлом, который вы удалили в своем mysql, то единственное решение:

откройте Мой.conf файл из меню Файл в МАМП

установите innodb_force_recovery в значение > 0

сохранить с помощью ctrl + S

MAMP предложит вам перезагрузить серверы

вернуться к строительству следующего единорога:)

5

автор: Adel ‘Sean’ Helal


Я должен был сделать комбинацию вещей. Сначала мне пришлось изменить разрешения на моем каталоге mysql. приложения/MAMP/db/mysql56 / mysql см. Stackoverflow здесь

Если это не работает, добавьте в my.cnf файл в папку applications/MAMP / conf со следующим

[mysqld]
innodb_force_recovery = 1

см. Адель ‘ Шон ‘ Хелал . ответ

Это то, что в конечном итоге работает для меня.


просто введите следующую команду в терминале:

rm /Applications/MAMP/db/mysql56/ib_logfile* 

и затем перезапустите MAMP.

Он отлично работает снова.

2

автор: Manish Shrivastava


я публикую это как потенциальный ответ!

то, что я сделал, чтобы решить эту проблему, было следующим:

  1. перезагрузите компьютер (чтобы убедиться, что процессы mysqld не запущены, даже если он разбился и пытается перезапустить себя)
  2. удалите все, что имеет какое-либо отношение к mysql на компьютере, выполнив эти команды:
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/MySQL*
    vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
    rm -rf ~/Library/PreferencePanes/MySQL*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    sudo rm -rf /var/db/receipts/com.mysql.*
  3. удалить MAMP, запустив деинсталлятор MAMP PRO, а затем удалив приложения/MAMP папка
  4. удалить Library/Application Support/appsolute Папка (папка поддержки приложений MAMP)
  5. переустановите MAMP PRO

надеюсь, это помогает :)


хорошо, поэтому я пробовал каждое предложение, которое я нашел здесь на SO и других форумах, я ничего не работал для меня. Единственное решение, которое сработало для меня, — установить версию MAMP 3, так как я использую MAMP для проектов wordpress версии 3.

1

автор: Axel de la Torre


Я пробовал все решения выше с версией 4.2 MAMP, и ни один из них не работал со мной в El Capitan OS, поэтому единственное, что сработало, было удалено MAMP с Clean My Mac, а затем установить более старую версию 3.5.2, которая работала сразу.


MAMP & MAMP PRO 4.0.6 запускал сервер MySql правильно, но перестал делать это после того, как моя машина обновила ОС до macOS Sierra (10.12.2). Я попробовал несколько вариантов, упомянутых здесь, включая настройку разрешений папки и переустановку и т. д. Казалось, ничто не исправило проблему для меня, поэтому я перешел на XAMPP и до сих пор он служит нормально.

обновление: у меня есть MAMP, работающий с этим простым решение здесь.


вот что сработало для меня:

  • Проверьте, случайно ли вы установили mysql через Brew или что-то еще. brew list mysql
  • удалить brew uninstall mysql
  • попробуйте запустить MAMP. Возможно, потребуется переустановить.
  • в конечном итоге обновление до бродяги и прекратить борьбу с MAMP.

что работал для меня было:

У меня был процесс под названием «mysqld», работающий даже когда MAMP был уволен. Я заставляю выйти из процесса, перезапускаю MAMP, и он снова работает.


удалите файлы ib_logfileN (N-номер) из папки MAMP/db/mysql56.

затем перезапустите MAMP.

Должно Работать!


у меня просто была эта проблема. Это шаги, которые сработали для меня.

  1. открыть Preferences в MAMP, запишите текущие номера портов Apache и MySQL.

    enter image description here

  2. щелкните Set to default Apache and MySQL ports и Reset MAMP кнопки затем OK.

  3. бросить МАМП

  4. удалить все файлы (не папки) из /Applications/MAMP/db/mysql справочник.

  5. перезагрузите MAMP и нажмите Start Servers.

    Примечание: если MySQL запускается нормально, но Apache этого не делает, вернитесь к Preferences и установите порт Apache обратно в то, что было раньше. MAMP должен обновиться после нажатия кнопки OK, и оба Apache и MySQL должны начаться.

  6. если http://localhost/MAMP/index.php не удается загрузить, откройте инструменты разработчика (Chrome), щелкните правой кнопкой мыши на кнопке обновления и выберите Empty Cache and Hard Reload. Страница phpAdmin должна загружаться. Если не попробовать собираюсь Application панель инструментов разработчика, выберите Clear Storage из меню и нажмите кнопку Clear Site Data.

Я надеюсь, что эти шаги обеспечивают быстрое исправление для кого-то без необходимости уничтожать таблицы базы данных.


в случае MAMP PRO вам нужно удалить ib_logfiles здесь:

rm -rf /Library/Application Support/appsolute/MAMP PRO/db/mysql56/ib_logfile*

Я видел на разных ответах, которые мы должны удалить ib_logfile0 и ib_logfile1 на Applications/MAMP/db/mysql56/

если вы используете MAMP PRO 4, эти файлы находятся в /Library/Application Support/appsolute/MAMP PRO/db/mysql56/

удаление файлов тезисов работает для меня (сервер не запускается после сбоя системы).

0

автор: Sébastien Gicquel


для меня строка innodb_additional_mem_pool_size в моем.cnf был причиной этого


вы можете попробовать это в вашем терминале : rm /Applications/MAMP/db/mysql/*.

это работает для меня.


вам нужно оставить базу данных mysql как есть.

  • удалить и переустановить MAMP Pro.
  • для каждого экземпляра WP, который вы хотите иметь на своем сервере (localhost), вам нужно создать новую базу данных, которая не является mysql.
  • перейдите в SequelPro и добавьте базу данных.
  • используйте Дубликатор для передачи WP.

Не используйте mysql ни для чего, похоже, это требуется MAMP.


Всем привет друзья! В этот очередной урок я расскажу вам подробную инструкцию по установке и настройке локального сервера mamp. Из него вы узнаете не только то, как установить, но и как пользоваться локальной средой для разработки веб сайтов и интернет магазинов.

Честно сказать, я перепробовал множество вариантов – от установки Denwer на свой компьютер, до Open Server. Если вы хотите пользоваться ими, то переходите по ссылкам и изучайте на здоровье 🙂

Для новичков мы отдельно прописали большое руководство о том, как установить WordPress на сайт несколькими способами

Я остановил свой выбор на MAMP и нисколько не жалею. Объясню причины:

  • Он прост в использовании и легко настраивается
  • В нем нет ничего лишнего, только самые основные настройки (чтобы не сбивать пользователя и не усложнять ему жизнь)
  • Он БЕСПЛАТЕН
  • И много другого.

Содержание:

  • Начало работы с MAMP
  • Инструкция по установке WordPress на сервер MAMP
  • Как перенести сайт WordPress с MAMP на выделенный хостинг?

Содержание

  • 1 Начало работы с MAMP
  • 2 Инструкция по установке WordPress на сервер MAMP
  • 3 Как перенести сайт WordPress с MAMP на выделенный хостинг?
    • 3.1 Рекомендую ознакомиться с этими статьями:

Ну что ж, теперь перейдем от слов к делу. В первую очередь вам нужно скачать с официального сайта дистрибутив сервера MAMP. Доступен он по этому адресу — https://www.mamp.info/en/downloads/

Не пугайтесь, что он на английском я вам все объясню и вашей школьной практики будет вполне достаточно, ну а если сомневаетесь, то переводчик от Google вам в помощь.

Доступен MAMP в двух версиях – для Windows и для MAC. Так как я использую первую операционку, то буду рассказывать на ее примере.

Нажимаем на оранжевую кнопку Download (Скачать) и начнем процесс загрузки. Он весит 236 Mb. Запаситесь терпением 🙂

Скачиваем локальный сервер MAMP

После загрузки кликайте на иконку установочного пакета, после чего вы запустите процесс распаковки и установки mamp на свой компьютер.

скачанный дистрибутив сервера на компьютере

Потом нажимаете постоянно далее. Там немного шагов, все как и при обычной установке программ на ваш компьютер, MAMP здесь не исключение.

Ок. После всех успешных действий вы увидите диалоговое окно в котором вы можете и будете запускать локальный сервер. Выглядит он так:

диалоговое окно запуска сервера MAMP

Особого внимания здесь заслуживает ссылка с шестеренкой и надписью Preferences (Настройки и привилегии).

Как вы уже знаете, то локальный сервер использует порт 80, его также использует и программа Скайп (Skype). И как это обычно бывает между ними возникает конфликт, в результате чего локальный сервер mamp может не запуститься. В этом нам и поможет данная опция Preferences.

Первая вкладка с настройками MAMP

И здесь мы встречаем не такое уж и большое количество вкладок. По умолчанию на первой должна стоять галочка в поле Start Servers when starting MAMP (Запускать сервера когда запускается MAMP). Т.е вы нажали на кнопку Старт (Запуск сервера) и автоматически запускаются все мощности локального сервера. Тут вроде бы все очевидно и так 🙂

Теперь вторая важная вкладка, которая нам необходима для разрешения конфликта между Скайпом – Ports (Порты).

Вкладка порты

Должно стоять так: порт Апач – 80, MySql порт – 3306. Если и это не помогает, тогда нажимаете на кнопку Set Mamp ports to default (Установить порты по умолчанию), т.е сам локальный сервер выберет необходимые. У меня все подействовало, так что должно подействовать и у вас.

Далее вкладка PHP:

Установка по умолчанию стандартной версии php

Ничего не меняем оставляем как есть.

Следующая таба – Web Server:

Указываем путь веб сервера

Здесь прописывается путь корня, в который будут помещаться наши будущие сайты – htdocs. Не советую менять, он выставлен по умолчанию. Все ваши проекты будут складываться здесь. Чуть дальше я объясню как это сделать.

Последняя вкладка о самом сервере – About MAMP:

Версия локального сервера и прочая информация

Указывается версия и разработчики (не информативная часть, хотя для кого как).

Теперь после проведенных настроект MAMP мы запускаем наш сервер и делаем это, как вы уже успели догадаться, нажав на ссылку START

Первый запуск локального сервера MAMP

В случае успеха у вас должны загореться два пункта зеленым цветом – Apache и MySql.  Отлично! Ваш сервер работает. Теперь зайдем на стартовую страницу, нажав на ссылку Open Start page. Вас перебросит в браузер и откроется вот такая вкладка:

Стартовая страница сервера

Здесь выложен только фрагмент. Он нам и нужен. Здесь вы в адресной строке увидите ваш локальный путь по которому будете обращаться к файлам сайта –
localhost/MAMP

Далее идет навигационное меню. В нем нас будет интересовать только один раздел Tools (Инструментарий). Именно здесь расположена ссылка для доступа в phpMyAdmin. Есть две версии – обычная и облегченная phpLiteAdmin. Я пользуюсь первой.

Раздел Tools - инструменты работы с базой данных

Здесь будут храниться все ваши базы данных – будь то если вы пишите сайт на php с нуля или используете движки Joomla или WordPress или любые другие. Давайте нажмем и посмотрим на интерфейс работы с базами данных:

Страница с базами данных phpMyAdmin в MAMP

Если вы еще не знаете, то в левой части располагаются сами базы данных с таблицами в них, а справа – их содержимое.

Другой раздел стартовой страницы MAMP – Phpinfo. Перейдя в него вы можете посмотреть версию php и другую информацию о конфигурации сервера.

На странице phpinfo можно узнать текущую версию php

В этом выпуске я использую PHP версию 5.6.8 (свежая на текущий момент записи).

Теперь перейдем к очень важному шагу.

Инструкция по установке WordPress на сервер MAMP

Да, я знал, что вы ждали именно этого шага. Получайте 🙂 Сейчас все досконально объясню.

Первым делом перейдите в сам сервер MAMP по следующему пути:

Путь по которому будут храниться все папки с сайтами ваших проектов

В этой папке мы с вами создаем тестовый проект – я назову Smarticle.ru. Т.е по сути мы с вами создаем обычную папку (для пущей ясности).

Создаем папку с новым будущим проектом

Все очень хорошо! Двигаемся дальше. Теперь идем на официальный сайт WordPress и скачиваем оттуда самую последнюю свежую версию – wordpress.org

Вы скачаете архив, который нужно будет распаковать, чтобы он у вас был вот такого вида:

Все файлы и папки CMS WordPress, которые вы скачали

Простой комбинацией ctrl+C копируем и переносим в нашу созданную папку – Smarticle.ru

С этим шагом все просто, распинаться не буду.

Теперь немножко вашего внимания, ибо могут у большинства пользователей возникнуть или сложности или ошибки. Нам нужно создать базу данных и связать ее с сайтом WordPress.

Для этого снова заходим в phpMyAdmin (вы уже знаете как) и нажимаем на Databases (Базы данных).

Базы данных - обзор

Здесь мы создадим новую базу данных куда будут записываться все таблицы и вся информация (контент и прочее). Называйте ее понятно для вас латинскими буквами. Я назову просто – Smart_db. Следующее поле Collation (Кодировка). Можете не присваивать. У меня нормально работает или же можете установить
utf8_general_ci

Создание новой базы данных

И нажимаете кнопку Create (Создать). Автоматически данная база данных отобразится в левой части экрана. Вот таким образом:

Появление новой созданной базы в общем списке всех баз

Теперь давайте подскажем CMS WordPress эту базу. Для этого в браузерной строке вводите следующий путь:

Вы вводите свое название папки с сайтом.

В результате у вас должна появиться страница с началом установки вордпресса на локальный сервер MAMP. Вот так:

Начало установки WordPress на сервер MAMP

Обязательно выберите русский язык и нажмите на кнопку «Продолжить». Далее нас приветствует WordPress с инструкцией по установке, мы нажимаем «Вперед».

Приветственное сообщение от Вордпресс

На следующем экране внимательно вводите следующую информацию:

  • Имя базы данных – ваше созданное имя (в моем случае smart_db);
  • Имя пользователя – root;
  • Пароль – root;
  • Сервер базы данных – localhost (не меняем, оставляем так);
  • Префикс таблиц – ничего не трогаем.

В итоге получится нечто такое:

Ввод информации о подключении к базе данных

Нажимаем на кнопку «Отправить» и видим, что Вордпресс одобряет и просит запустить установку.

Запуск установки WordPress

Заключительный момент – осталось придумать название сайта, задать имя входа и пароль, адрес почты.

  • Название сайта – Бизнес Блог Макса Метелева
  • Имя пользователя – admin
  • Пароль – ваш пароль (не забудьте повторить)
  • Адрес почты – ваша почта

И нажимаете – Установить WordPress

Указываем информацию для входа на сайт

Далее входим в админку и работаем с сайтом:

Первый вход в админку сайта WordPress

Как перенести сайт WordPress с MAMP на выделенный хостинг?

Теперь давайте разберем такую ситуацию, когда вы уже закончили создавать сайт на локальном хостинге и вам его вместе со всеми таблицами базы данных нужно перенести на ваш платный выделенный хостинг. Рекомендую к прочтению статью – 7 причин, по которым стоит сменить вашего хостинг провайдера.

Есть один нюанс – если вы используете платный хостинг, то при установке он задает имя базы данных, согласно имени вашего аккаунта. Конечно можно сразу же создать базу с нужным именем, но если вы еще не определились какого хостера выбрать, то могут возникнуть некоторые неясности. В начале нам нужно установить WordPress на нашем уже выделенном хостинге и выбрать домен или поддомен для него. Переходите по ссылкам и прочитайте как это можно сделать. Все просто как дважды два. Не буду останавливаться на этом шаге.

А вот с созданием базы данных я все-таки поясню. Заходим в наш аккаунт (я использую SWEB) и переходим в раздел Базы MySql

Раздел базы MySql в Sweb

В появившемся окне создадим новую.

Создание новой базы на хостинге SpaceWeb

Как видите, имя автоматически присваивается как
smarticlru_  (это префикс) и далее предлагается придумать название. Мы ограничены 5 символами. Выбор невелик – можем задать имя что-то навроде
smarticlru_newdb

Затем придумаваете пароль – лучше надежный и сложный (запишите, чтобы на забыть).

Прописываем имя базы и пароль

Нажимаем «Создать».

Теперь она у нас отразится в общем списке. Далее нам необходимо перейти по иконке с названием pma (phpMyAdmin)

Кликаем на значок PMA (PhpMyAdmin)

Затем вы снова вводите пароль, который задали в момент создания.

Вводим пароль, чтобы войти в базу

И мы чудесным образом оказываемся в полюбившейся Вам интерфейсе пхпмайадмин 🙂

Сейчас самое интересное – нам нужно сохранить у себя на компьютере базу данных с локального сервера, чтобы потом ее импортировать в новую на выделенном сервере. Для этого идем в phpMyAdmin MAMP выбираем нашу базу –
smart_db  и переходим по ссылке Export (Выгрузка)

Экспорт таблицы базы данных (выгрузка) с локального сервера MAMP

Затем выбираете метод – или быстрый или обычный (отображает все опции). Я всегда выбираю второй вариант. Вот так:

Выбор из двух вариантов методов экспорта таблиц базы данных

По умолчанию все таблицы уже выделены. Все, что вам нужно будет сделать это нажать на кнопку «Go» в самом внизу страницы и получить копию вашей базы данных на свой компьютер.

Начало выгрузки после нажатия на кнопку Go

Очень хорошо. Базу скопировали давайте теперь поменяем все урлы вида
http://localhost/smarticle.ru/  на нормальный урл
https://smarticle.ru

Берем любой редактор кода (я пользуюсь SubLime Text 2) открываем в нем нашу базу данных и нажимаем комбинацию ctrl+F (найти все) и сделаем замену всех урлов на нужные и затем сохраним таблицу.

Поиск и замена всех урлов с локального вида на нормальный

Снова возвращаемся к выделенному платному хостинг аккаунту и перейдем в phpMyAdmin . На этом шаге нам нужно нажать на кнопку ИМПОРТ (загрузить).

Импорт сохраненной базы с локального сервера на выделенный в SpaceWeb

Выбираем файл базы на компьютере и нажимаем на кнопку Ок.

Начало работы импорта файлов базы данных

Все здорово! Импорт прошел успешно. Теперь, что Вордпресс уже на вашем платном хостинге увидел базу данных, вам необходимо сделать изменения в конфигурационном файле
wpconfig.php  Открываем его и прописываем следующее:

Связываем базу данных с сайтом Вордпресс уже на выделенном хостинге

Имя пользователя и имя базы данных у вас должны совпадать!

Сохраняете изменения и теперь при обращении уже к новому сайту без локальной привязки у вас должно все прекрасно работать. В скором времени для лучшей наглядности запишу видео урок. На этом статью заканчиваю. Спасибо за внимание, терпение. Не забывайте нажимать на социальные кнопки и подписывать на новые выпуски статей умного блога! До новых встреч, пока.

Понравилась статья? Поделить с друзьями:
  • Не запускается magicka на windows 10 ничего не происходит
  • Не запускается mafia definitive edition steam на windows 10
  • Не запускается mafia 1 steam на windows 10 ijoy dll
  • Не запускается lolminer на windows 10
  • Не запускается lol на windows 10