MySQL 5.5.11 Installation Debugging – Step Three
There’s no shortage of problems when trying to do something simple, especially when we’re pirating into new territory. This is a compilation of commands that you can use in order to debug your MySQL problems. I hope that these help.
FYI: I found this nice reference manual while stumbling around google. MySQL Reference for OS X
Stopping Processes
If you had entered a command and you want to stop the process then try this.
Hold Ctrl + C
Killing Processes
First things first you need to locate the process number. This is a lot like using Ctrl + Alt + Delete and loading the windows process manager to end a process.
ps aux | grep mysql
Once you’ve located the five digit number thats assigned to the process that you want to stop, you’ll run the kill command and pass the number as the parameter.
$ kill 12345
Error Logs
First things first, you’ve got to check your error logs.
$ less /var/log/mysql/error.log
Use your arrow keys to navigate the file. To exit this view use the following:
Hold Ctrl + Z
Viewing a Commands Thought Process
This command will print out everything as the command walks through the code. You’ll see all of the system errors as they happen… if any.
$ sh -x /usr/local/mysql/bin/mysqld_safe --skip-grant-tables --defaults-file=/etc/my.cnf --user=root
Viewing the Results of the Installation
The installation command will setup the mysql database that runs all of the sub databases that you will later setup. To see a directory listing of the files that were installed, if any, within your directories, then run this command. Be sure to change out the directory path with the directory that you want to view.
$ ls -l /var/lib/mysql
$ ls -l /var/lib/mysql/mysql
