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 |
|
Code:
mysql -u root -p |
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 |
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 |
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 |
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 |
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 |
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. |
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_u:object_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_u:object_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_u:object_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_u:object_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) |
What is the result after
Quote:
|
All times are GMT -5. The time now is 05:19 AM. |