Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools

Ria Carmin
PLUS
Ria Carmin
Courses Plus Student 11,848 Points

MySQL Workbench: cannot stop the server

When I try to stop the server in Startup / Shutdown MySQL Server, I get this error: ERROR! MySQL server PID file could not be found!

2014-10-03 15:56:21 - Server is running
2014-10-03 15:56:28 - Stopping server...
2014-10-03 15:56:28 - Executing '/usr/local/mysql/support-files/mysql.server stop'
2014-10-03 15:56:28 - Stop server: ERROR! MySQL server PID file could not be found!

2014-10-03 15:56:28 - Stop server: 
2014-10-03 15:56:28 - Server stop done.
2014-10-03 15:56:28 - Checking server status...
2014-10-03 15:56:28 - MySQL server is currently running
2014-10-03 15:56:28 - Checking server status...
2014-10-03 15:56:28 - MySQL server is currently running

I'm running MySQL Workbench 6.2

Has anyone had a similar issue?

2 Answers

Ria, can to see if this solution works for you?

Ria Carmin
Ria Carmin
Courses Plus Student 11,848 Points

I've restarted the server and now I'm getting this…

2014-10-03 18:19:06 - Server is running
Could not open error log file: [Errno 13] Permission denied: '/usr/local/mysql/data/Rias-MacBook-Pro.local.err'
2014-10-03 18:19:11 - Stopping server...
2014-10-03 18:19:11 - Executing '/usr/local/mysql/support-files/mysql.server stop'
2014-10-03 18:19:11 - Stop server: cat: /usr/local/mysql/data/Rias-MacBook-
2014-10-03 18:19:11 - Stop server: Pro.local.pid: Permission denied
 ERROR! MySQL server process # is not running!
rm: /usr/local/mysql/data/Rias-MacBook-Pro.local.pid: Permission denied

2014-10-03 18:19:11 - Server stop done.
2014-10-03 18:19:11 - Checking server status...
2014-10-03 18:19:11 - MySQL server is currently running
2014-10-03 18:19:11 - Checking server status...
2014-10-03 18:19:11 - MySQL server is currently running

Have you tried sudo in front of the command?

Ria Carmin
Ria Carmin
Courses Plus Student 11,848 Points

I can stop the server from the Terminal (woohoo!! :D) by running sudo /usr/local/mysql/support-files/mysql.server stop, but Workbench doesn't know sudo (or does it?…)

Oh well… at least it's something :)

Ria, the sudo command gives you permission to do things on your system you normally wouldn't have access to. Be careful using sudo, as it can cause harm to your machine if you run the wrong commands.

More information can be found about the console in the Treehouse course Console Foundations if you're interested.

The sudo command

The sudo command stands for "superuser do". It prompts you for your personal password and confirms your request to execute a command by checking a file, called sudoers, which the system administrator configures. Using the sudoers file, system administrators can give certain users or groups access to some or all commands without those users having to know the root password. It also logs all commands and arguments so there is a record of who used it for what, and when. —Indiana University

Can you check the commands here:

Start Stop MySQL Commands

Ria Carmin
Ria Carmin
Courses Plus Student 11,848 Points

Any tips on how to configure a stop command? :)

That's what I have right now /usr/local/mysql/support-files/mysql.server stop