Меню Рубрики

Mysql mac os restart

How to Start & Stop MySQL Manually in OS X El Capitan & Yosemite

Many developers require MySQL on their Macs, but if you’ve tried to install MySQL in OS X El Capitan and Yosemite, you likely noticed that you’ll get an “installation failed” error during the process. That error sounds worse than it is, because you can avoid it entirely by choosing not to install the startup item included in the MySQL bundle, or, you can just ignore the installation error and start MySQL yourself when you need it. Either way, MySQL actually installs fine, it’s just the bundled startup item that does not function. As you probably guessed, that means you’ll need to start and stop MySQL yourself.

Yes a preference panel gets installed that allows for a GUI approach, but many users prefer to use the command line for this purpose since many of us work in the Terminal anyway, and it has the added possibility of being automated.

Starting, Stopping, Restarting MySQL on Mac OS X

Hre are the three basic commands to start, stop, and restart MySQL in Mac OS X, including OS X El Capitan and OS X Yosemite. Be sure to enter the command onto a single line, sudo obviously requires an administrator password to be entered.

Start MySQL

sudo /usr/local/mysql/support-files/mysql.server start

Stop MySQL

sudo /usr/local/mysql/support-files/mysql.server stop

Restart MySQL

sudo /usr/local/mysql/support-files/mysql.server restart

Of course, these can be combined with starting and stopping Apache server if your intention is to setup a local web development environment.

You can download the latest version of MySQL for Mac OS X here. Future versions of the MySQL installer will undoubtedly fix this for OS X but in the meantime if you get the installation error, either customize the installer and avoid the startup item, or ignore the error and start and stop mysql yourself when it’s needed.

Those interested can also follow a workaround posted to StackOverflow here to automatically load MySQL on boot in OS X El Capitan or Yosemite.

Start, Stop, Restart MySQL from Mac OS Preference Panel

Of course, you can also start and stop the MySQL server from the bundled preference panel. To do that, simply go to the  Apple menu and open System Preferences. Choose the “MySQL” preference panel, then click on the “Start MySQL Server” button to start MySQL Server on Mac. If the server is already started, the button will change to “Stop MySQL Server”. If you want to restart the server, simply click to turn it off, wait a minute or so, then turn it back on again. This will be the easy approach for many Mac users, though you’ll have to fiddle with the pref panel as necessary, and if you go that route you’ll want to uncheck the auto-start option because it’s going to fail.

I’m partial to the command line approach for the time being, but use whatever is most appropriate for your situation.

By the way, these mySQL server management methods continue to work in MacOS Sierra as well.

Источник

How do you stop MySQL on a Mac OS install?

I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?

20 Answers 20

There are different cases depending on whether you installed MySQL with the official binary installer, using MacPorts, or using Homebrew:

Homebrew

MacPorts

Note: this is persistent after a reboot.

Binary installer

/Library/LaunchAgents/homebrew.mxcl.mysql.plist – Kostas Jun 12 ’13 at 12:48

For those who used homebrew to install MySQL use the following commands below to start, stop, or restart MySQL

Brew start

Brew restart

Brew stop

You can always use command «mysqladmin shutdown»

If you are using homebrew you can use

for a list of available services

sudo /usr/local/mysql/support-files/mysql.server stop

sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop

You can also use start and restart here. I found this by looking at the contents of /Library/LaunchDaemons/org.macports.mysql.plist.

Apparently you want:

However, I found that the second option only worked (OS X 10.6, MySQL 5.1.50) if the .plist has been loaded with:

PS: I also found that I needed to unload the .plist to get an unrelated install of MAMP-MySQL to start / stop correctly. After running running this, MAMP-MySQL starts just fine:

sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist

On my mac osx yosemite 10.10. This command worked:

You can find your mysql file in folder /Library/LaunchDaemons/ to run

One could probably get away with not using sudo. The user could be root for example (that is, the MySQL root user).

Well, if all else fails, you could just take the ruthless approach and kill the process running MySQL manually.

to list all processes, then do » kill

is the process id of the MySQL daemon (mysqld).

Latest OSX (10.8) and mysql 5.6, the file is under Launch Daemons and is com.oracle.oss.mysql.mysqld.plist. It presents an option under System Options, usually the bottom of the list. So go to system settings, click on Mysql, and turn it off from the option box. https://dev.mysql.com/doc/refman/5.6/en/osx-installation-launchd.html

For me it’s working with a «mysql5»

In my case, it kept on restarting as soon as I killed the process using PID. Also brew stop command didn’t work as I installed without using homebrew. Then I went to mac system preferences and we have MySQL installed there. Just open it and stop the MySQL server and you’re done. Here in the screenshot, you can find MySQL in bottom of system preferences.

Источник

Restart, Start, Stop MySQL from the Command Line macOS, OSX, Linux

To start, stop or restart MySQL server from the command line, type the following at the command prompt(shell).

1. On Linux start/stop/restart from the command line:

Some Linux flavors offer the service command too

2. On macOS Sierra & OS to start/stop/restart MySQL post 5.7 from the command line:

3. On OS X to start/stop/restart MySQL pre 5.7 from the command line:

Related Tags:

uninstall mysql mac
error mysql server pid file could not be found
how to run mysql on mac
start mysql command line mac
mysql server not starting mac
mysql server wont start mac sierra
restart mysql centos 7
mac mysql command line
restart mysql ubuntu
uninstall mysql mac
install mysql server mac
how to use mysql on mac
mysql server command not found
stop mysql server windows
install mysql workbench mac
mysql el capitan
restart mysql mac brew
brew mysql start
restart mysql centos
innodb: unable to lock ./ibdata1 error: 35
mac run mysqld as root
could not load mysql preference pane
brew reset mysql password
brew install mysql specific version
brew install mysqldump
the server quit without updating pid
my.cnf location mac
mysql server won t start mac sierra
brew mysql logs
brew services logs
error: formula `mysql` is not installed.
mac restart mysql brew
brew restart postgres
can’t stop mysql server mac
homebrew stop mysql
high sierra mysql
how to upgrade mysql on mac
uninstall mysql mac sierra
mysql server won’t start mac sierra
mysql server instance is stopped mac
install mysql high sierra
install mysql preference pane mac
mac mysql reset root password
mac mysql command not found
restart mysql ubuntu
uninstall mysql mac
install mysql server mac
how to use mysql on mac
mysql server command not found
stop mysql server windows
install mysql workbench mac
mysql el capitan
restart mysql mac brew
brew mysql start
restart mysql centos
innodb: unable to lock ./ibdata1 error: 35
mac run mysqld as root
could not load mysql preference pane
brew reset mysql password
brew install mysql specific version
brew install mysqldump
the server quit without updating pid
my.cnf location mac
mysql server won t start mac sierra
brew mysql logs
brew services logs
error: formula `mysql` is not installed.
mac restart mysql brew
brew restart postgres
can’t stop mysql server mac
homebrew stop mysql
high sierra mysql
how to upgrade mysql on mac
uninstall mysql mac sierra
mysql server won’t start mac sierra
mysql server instance is stopped mac
install mysql high sierra
install mysql preference pane mac
mac mysql reset root password
mac mysql command not found

Источник

запустите MySQL server из командной строки в Mac OS Lion

Я установил mySQL для моего Mac. Помимо запуска SQL server с mySQL.инструмент prefPane, установленный в System Preference, я хочу знать инструкцию для запуска из командной строки. Я делаю следующее:

Я запускаю сервер mySQL с помощью командной строки, он выдает ошибку, как показано ниже:

sh-3.2# / usr/local/mysql/bin / mysqld

111028 16:57:43 [Предупреждение] параметр lower_case_table_names=2, потому что файловая система для/usr/local / mysql-5.5.17-osx10.6-x86_64/data/ is case бесчувственный!—1—>

111028 16:57:43 [ошибка] фатальная ошибка: пожалуйста, прочитайте раздел «Безопасность» руководство, чтобы узнать, как запустить mysqld как root!

111028 16:57:43 [ошибка] прерывание

111028 16:57:43 [Примечание] / usr / local / mysql/ bin / mysqld: завершение работы полный

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Mysql install mac os
  • Mysql client mac os
  • Mypaint для mac os
  • Myhomelib для mac os
  • Myhomelib for mac os