LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2006, 08:32 AM   #1
va1damar
LQ Newbie
 
Registered: Oct 2006
Posts: 17

Rep: Reputation: 0
mysql installs fine* - starts poorly


I installed mysql5 following some pretty decent directions on lamphowto.com and it seemed to work just fine - no errors or complaints. And when I first tried to start it up it worked fine

Code:
nimbus:~ # /etc/rc.d/init.d/mysql start
Starting MySQL ..                                                     done
nimbus:~ # /etc/rc.d/init.d/mysql stop
Stopping MySQL ..                                                     done
Then i tested mysqladmin (which worked) and used it to set the root password started mysql and tried to log in as root

Code:
nimbus:~ # mysqladmin version
nimbus:~ # mysqladmin -u root password pa$$word
nimbus:~ # /etc/rc.d/init.d/mysql start
Starting MySQL                                                        done
nimbus:~ # mysql -u root -p
Enter password: pa$$word
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I was pretty sure I didn't just forget the password because it was still in plain print on the terminal screen, but I followed some directions from netadmintools.com/art90.html to reset the root password because it was the only thing I could think of.

Code:
nimbus:~ # killall mysqld
nimbus:~ # /etc/rc.d/init.d/mysql start --skip-grant-tables --user=root
Starting MySQL                                                        done
nimbus:~ # mysql
mysql> USE mysql
Database changed
mysql> UPDATE user
    -> SET password=password("pa$$word")
    -> WHERE user="root";
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2  Changed: 2  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
this didn't work either and now I can't even start mysql normally

Code:
nimbus:~ # /etc/rc.d/init.d/mysql start
Starting MySQL...................................                     failed
nimbus:~ # /etc/rc.d/init.d/mysql start --skip-grant-tables --user=root
Starting MySQL                                                        done
the last thing i did was run [mysql source dir]/scripts/mysql_install_db again to see if it would reset things & wash away my problem. It did reset the user table at least, but I still can't start mysql normally.

Does anyone have any suggestions for me?
 
Old 11-13-2006, 09:26 AM   #2
va1damar
LQ Newbie
 
Registered: Oct 2006
Posts: 17

Original Poster
Rep: Reputation: 0
I tried to run mysql one last time, and the cooresponding err in the log said:
Code:
061113 10:05:14  mysqld started
061113 10:05:14  InnoDB: Started; log sequence number 0 43655
/usr/local/mysql5/libexec/mysqld: File './mysql-bin.000010' not found (Errcode: 13)
061113 10:05:14 [ERROR] Failed to open log (file './mysql-bin.000010', errno 13)
061113 10:05:14 [ERROR] Could not open log file
061113 10:05:14 [ERROR] Can't init tc log
061113 10:05:14 [ERROR] Aborting

061113 10:05:14  InnoDB: Starting shutdown...
061113 10:05:16  InnoDB: Shutdown completed; log sequence number 0 43655
061113 10:05:16 [Note] /usr/local/mysql5/libexec/mysqld: Shutdown complete

061113 10:05:16  mysqld ended
there are 10 mysql-bin.0000## files in the data directory. the first 4 are owned by mysql, and the last 6 including the one the error log is complaining about, are owned by root. I guess that explains why mysql couldn't read the file.

The first mysql-bin file that is owned by root was created at 16:51 last friday when i first ran into this problem. The log entries for that time are:

Code:
061110 16:46:37  mysqld started
061110 16:46:37  InnoDB: Started; log sequence number 0 43655
061110 16:46:37 [Note] /usr/local/mysql5/libexec/mysqld: ready for connections.
Version: '5.0.27-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
061110 16:51:13 [Note] /usr/local/mysql5/libexec/mysqld: Normal shutdown

061110 16:51:13  InnoDB: Starting shutdown...
061110 16:51:15  InnoDB: Shutdown completed; log sequence number 0 43655
061110 16:51:15 [Note] /usr/local/mysql5/libexec/mysqld: Shutdown complete

061110 16:51:15  mysqld ended

061110 16:51:20  mysqld started
061110 16:51:20  InnoDB: Started; log sequence number 0 43655
/usr/local/mysql5/libexec/mysqld: File './mysql-bin.000005' not found (Errcode: 13)
061110 16:51:20 [ERROR] Failed to open log (file './mysql-bin.000005', errno 13)
061110 16:51:20 [ERROR] Could not open log file
061110 16:51:20 [ERROR] Can't init tc log
061110 16:51:20 [ERROR] Aborting

061110 16:51:20  InnoDB: Starting shutdown...
061110 16:51:22  InnoDB: Shutdown completed; log sequence number 0 43655
061110 16:51:22 [Note] /usr/local/mysql5/libexec/mysqld: Shutdown complete

061110 16:51:22  mysqld ended
so it looks like mysql started up fine & shutdown at 16:51. Then i tried to start it 5 seconds later & it ran into the same problem I'm having now for the first time. So what could have happened that switched the owner of these mysql-bin files over to root? I wonder if it was something I did through mysql admin. But all I did was check the version & change the root password.
Code:
nimbus:~ # mysqladmin version
nimbus:~ # mysqladmin -u root password pa$$word
 
Old 11-13-2006, 10:18 AM   #3
va1damar
LQ Newbie
 
Registered: Oct 2006
Posts: 17

Original Poster
Rep: Reputation: 0
just had to change the owner:grp back to mysql & it worked fine
 
  


Reply



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
10.1 installs fine on a HP ZE4145 mttoptv SUSE / openSUSE 1 05-20-2006 07:08 PM
installs fine, but won't boot. Kernel_Sanders *BSD 3 04-06-2006 12:54 PM
suse 10.0; first cd installs fine, others don't, cannot mount them ajagodnik SUSE / openSUSE 5 10-17-2005 10:38 AM
xandros installs fine, fedora won't see hdb? houstoncarl Linux - Newbie 1 09-18-2005 05:21 PM
YDL installs fine but won't boot on 17" Powerbook DannyG Linux - Hardware 0 09-22-2004 11:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:05 AM.

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