[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: myqsl dummy needs help

Gene Heskett wrote:
On Monday 16 February 2009, Craig White wrote:
On Mon, 2009-02-16 at 17:52 -0500, Gene Heskett wrote:
On Monday 16 February 2009, Craig White wrote:
On Mon, 2009-02-16 at 15:51 -0500, Gene Heskett wrote:
On Monday 16 February 2009, Anne Wilson wrote:
On Monday 16 February 2009 20:27:04 Gene Heskett wrote:
No package webmin available.
Nothing to do
I don't think I've ever had webmin from a distro package, but it
installs so easily from the website.

I found it, installed it, let it do its updates, but a scan for servers
doesn't find mysql cuz it is not running and now won't run.

I had NDI this was going to such a PIMA, but a friend has mythtv
running at his place and it does everything but fix breakfast.

If anyone has any idea how to reset this SOB to absolutely square one,
never having been run, please advise.  Deleting /var/lib/mysql didn't
do it.
you don't delete /var/lib/mysql
you delete /var/lib/mysql/*

mkdir /var/lib/mysql
chown mysql:mysql /var/lib/mysql
service mysqld start
I got to here ^^^ and selinux stuck up its hand & waved at me.
SELinux is preventing mysqld (mysqld_t) "create" to mysql.sock

And recommended I run restorecon -v 'mysql.sock', but:
[root coyote rpms]# restorecon -v 'mysql.sock'
restorecon:  stat error on mysql.sock:  No such file or directory

So I go back to the top of the list above and repeat, apparently forever
cuz I get the same thing when I restart mysqld.

Now, since mysql.sock doesn't exist, because it can't create it, therefore
restorecon can't do anything about it, WTH do I do next?

So I located the old one in the database, touched a new one, then
'chown mysql:mysql mysql.sock;restorecon -v mysql.sock'  No errors
reported. But, a 'service mysqld start' eventually fails.  And now the
selinux count is plus 2 cuz I tried it twice.

So how do we fix YAMYSQLFSCKUP?
ignoring that the person whining is the one who deleted the directory in
the first place, it should have been obvious to you that you needed to
also restore the security contexts on /var/lib/mysql when you recreated

Are you having a good time blaming everything else for your troubles?

There are millions of people running mysql without your issues.


With all due respect Craig, it must have done it once, over a year ago, but I haven't been using it for anything. I had yum rpm -e the whole thing which took a few other things along with it, then reinstalled the whole maryann.

No change. If, when it was installed originally, it spit out any such errors, I don't after a year, recall them, and selinux has been updated a dozen times since the install and my re-enabling selinux. So lets be realistic and see just what the hell we can do about selinux killing mysql instead of your usual shoot the messenger attitude.

Name calling won't solve anyone's problems, gang.  Let's try to keep
this a bit more professional, shall we?

Now, to address the issue, /var/lib/mysql/mysql.sock is a FIFO (actually
a named pipe), not an actual file and is created when mysqld starts up and deleted when mysql shuts down. When mysqld is running, it should
appear as follows:

# ls -lZ mysql.sock
srwxrwxrwx  mysql mysql unconfined_u:object_r:mysqld_var_run_t:s0 mysql.sock

If your /var/lib/mysql/mysql.sock is a regular file (which it would be
if you used "touch" to create it), first delete the file and run
"restorecon -v /var/lib/mysql" as root.  Then see if mysql will start
up.  It may not, because if you "rm -rf /var/lib/mysql", then you also
destroyed mysql's users, hosts and permissions database which it needs
to manage things.  You should be able to recover them by running the
following commands:

	# mysql </usr/share/mysql/mysql_system_tables.sql
	# mysql </usr/share/mysql/mysql_system_tables_data.sql
	# mysql </usr/share/mysql/mysql_fix_privilege_tables.sql

Or "yum remove mysql*" and reinstall the packages that get removed.
- Rick Stevens, Systems Engineer                      ricks nerd com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-   To understand recursion, you must first understand recursion.    -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]