LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-10-2009, 03:22 AM   #1
Berwhale
Member
 
Registered: Jan 2008
Posts: 30

Rep: Reputation: 15
Installing MythTV on Fedora 10 and forgotten root password for mysqld - I think?


Hi Peeps,

I am in the process of installing MythTV on Fedora 10. I was following some outdated installation guide. Now am following http://www.mythtv.org/wiki/Installing_MythTV_on_Fedora

However with mysqld I try the following:

# mysql -u root mysql

And get:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I think I may have set the root password for mysql some time ago but can not remember it. How does one reset it? I have seen and not been able to follow some instructions for this before. If you could humour me, not skip on details please?

Cheers,
Berwhale
 
Old 02-10-2009, 03:42 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
http://www.linuxquestions.org/linux/...ssword_recovey

-twantrd
 
Old 02-10-2009, 10:54 AM   #3
mase
LQ Newbie
 
Registered: Jul 2008
Posts: 22

Rep: Reputation: 15
Code:
mysql -u root -p
to login.
 
Old 02-11-2009, 03:07 AM   #4
Berwhale
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Have changing password - got the following:

When entering:

/usr/bin/safe_mysqld --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --datadir=/var/lib/mysql
--skip-grant-tables --skip-networking &

I got:

[1] 16583
-bash: /usr/bin/safe_mysqld: No such file or directory

....Help needed,

Cheers,
Berwhale
 
Old 02-11-2009, 01:46 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Then it's not in /usr/bin. It's somewhere else. The path is not going to be the same depending on how it was packaged and how you installed it. Most likely it's in the same path that you ran 'mysql' from.

-twantrd
 
Old 02-13-2009, 06:08 PM   #6
Berwhale
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Still trying

OK so I found a file "mysql_safe" rather than "safe_mysql" in the /usr/bin directory so entered:

/usr/bin/mysqld_safe --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld.pid --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &

And got the following:

[1] 19788
[root@Diamond ~]# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld.pid
090214 11:00:37 mysqld ended

Then I tried:

mysqladmin -u root flush-privileges password "newpassword"


And got in return:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!


I checked that /var/lib/mysql/mysql.sock exists - it does but is 0 bytes.

Please help.Cheers, Berwhale
 
Old 02-13-2009, 06:23 PM   #7
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Your mysqladmin command didn't work because mysql didn't start up. Look at your output. It said "STOPPING server from ....". Check the logs and see why.

-twantrd
 
Old 02-21-2009, 03:47 AM   #8
Berwhale
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Sorry I don't follow

I understand mysql is stopping, but have looked at System Log with no success. I don't quite get what I'm looking for or where I should be looking.

Berwhale
 
Old 02-21-2009, 05:13 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Use chkconfig to enable mysql. (sudo /sbin/chkconfig --level 2345 mysql on) Be on the lookout for problems from selinux. Also, download the mysql manual (if your mysql package doesn't supply it) and read the chapter on securing the mysql server. You may already have done this. There is a demo database with no security to drop, and you may need to give the root user a password.

In the mysql database (e.g. USE mysql;), run the query
SELECT Host, User, Password FROM user;

Look for entries in the password column that don't have password hashes.
 
Old 02-22-2009, 04:44 AM   #10
Berwhale
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Still not following, I'm afraid

I tried:

/sbin/chkconfig --level 2345 mysqld on

then tried:

/usr/bin/mysqld_safe --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld.pid --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &

And got still:

nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld.pid
090222 21:37:42 mysqld ended

While this was occurring I got a SELinux message, see below:





Summary:

SELinux is preventing rm (mysqld_safe_t) "write" to ./mysql (mysqld_db_t).

Detailed Description:

SELinux denied access requested by rm. It is not expected that this access is
required by rm and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for ./mysql,

restorecon -v './mysql'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinu...fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context unconfined_u:system_r:mysqld_safe_t:s0
Target Context system_ubject_r:mysqld_db_t:s0
Target Objects ./mysql [ dir ]
Source rm
Source Path /bin/rm
Port <Unknown>
Host Diamond
Source RPM Packages coreutils-6.12-18.fc10
Target RPM Packages
Policy RPM selinux-policy-3.5.13-45.fc10
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name catchall_file
Host Name Diamond
Platform Linux Diamond 2.6.27.15-170.2.24.fc10.i686 #1 SMP
Wed Feb 11 23:58:12 EST 2009 i686 i686
Alert Count 1
First Seen Sun 22 Feb 2009 09:30:49 PM EST
Last Seen Sun 22 Feb 2009 09:39:43 PM EST
Local ID 7e14785c-de8c-4953-8606-18aed35a5d4d
Line Numbers

Raw Audit Messages

node=Diamond type=AVC msg=audit(1235299183.344:32): avc: denied { write } for pid=5029 comm="rm" name="mysql" dev=dm-0 ino=1220611 scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=system_ubject_r:mysqld_db_t:s0 tclass=dir

node=Diamond type=AVC msg=audit(1235299183.344:32): avc: denied { remove_name } for pid=5029 comm="rm" name="mysql.sock" dev=dm-0 ino=1220676 scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=system_ubject_r:mysqld_db_t:s0 tclass=dir

node=Diamond type=AVC msg=audit(1235299183.344:32): avc: denied { unlink } for pid=5029 comm="rm" name="mysql.sock" dev=dm-0 ino=1220676 scontext=unconfined_u:system_r:mysqld_safe_t:s0 tcontext=unconfined_ubject_r:mysqld_db_t:s0 tclass=sock_file

node=Diamond type=SYSCALL msg=audit(1235299183.344:32): arch=40000003 syscall=301 success=yes exit=0 a0=ffffff9c a1=bfbb39a5 a2=0 a3=bfbb39a5 items=0 ppid=4980 pid=5029 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="rm" exe="/bin/rm" subj=unconfined_u:system_r:mysqld_safe_t:s0 key=(null)
 
Old 03-17-2009, 03:56 AM   #11
ps_sabu
Member
 
Registered: Nov 2006
Location: Kerala, South India
Distribution: Ubuntu 12.10, Ultimate Edition 3.5, OZ Unity 3.0 Black Opal
Posts: 117

Rep: Reputation: 15
What is the result after

Quote:
restorecon -v './mysql'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgotten Password of root in Fedora 8, Cant login, need it badly :( confulity Linux - General 3 09-18-2008 11:18 PM
if the root password is forgotten..... AnimaSola Linux - Software 1 05-31-2005 10:12 PM
forgotten my root password, help amanjsingh Linux - Newbie 16 03-31-2004 09:41 PM
Forgotten my root password Blondie Linux - Newbie 2 12-08-2003 11:50 AM
Root Password FORGOTTEN kajensen Linux - Newbie 4 08-11-2003 02:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration