Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I'm in the process of setting up a new Debian box as a web server. It needs to be as secure as I can get it. I had apache2 and mysql set up and all of the SSl taken care of.

After installing selinux I noticed that my browser and ftp in the terminal wont connect to localhost, other computers on my network can connect to the apache server via a global ip, but it wasn't pulling database info. When I checked, I found that mysql was stopped. When I try to start it, it times out.

After some googling and trying a bunch of setsebools I finally just disabled selinux in /etc/selinux/config. I rebooted and confirmed selinux was disabled, but still the same issues.

What is the best way to debug this?

If it helps the error php throws when trying to connect to mysql is "can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"

If SELinux is disabled, it sounds like it's not the (proximate) cause of the problem. Have you checked that mysqld is running and that the file /var/run/mysqld/mysqld.sock actually exists? If it does, are its permissions set right?

I suppose it's possible that SELinux is somehow preventing MySQL from starting up right. Have you tried starting SELinux up in permissive mode, so that it logs what actions it would take, but does not actually enforce them? This might give you a clue if there is a SELinux related problem.

the .sock file does not exist. After some googling, I gather that the .sock file is created when mysqld is started, but selinux changed some permissions around so that the mysql user couldn't create the sock file.

I didn't explore the problem too far as this project as become more of an learning experience for me and I've decided to start again from scratch to see how much of what I've learned stuck.