Carl E. Hartung wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Robert A. Rawlinson wrote:
| Yes its running. I checked with "ps ax | grep mysql" However I tryed | that command. Still running but when I try to do anything I get the | can't connect message.
Bob,
Sorry for the delay, but I keep getting called away at this end (sigh!)
Let me get this straight:
1. You installed MySQL 2. You ran, as root, "mysql_install_db"
If you mean "su root " then yes
3. Then, as root, you created a root password for the server: ~ mysqladmin -u root password "my-password" (no quotes)
No when I tried to do this it came back with the no connect msg.
~ mysqladmin -u root -h linux password "my-password" (ditto)
- --> If you did the three steps, above, try this
4. Make sure the server is running from a fresh start:
(as root) rcmysql status -------------------------------------->running
When I did this it came back with unused.
rcmysql stop ---------------------------------------->done
when I did this it did come back with done.
rcmysql start --------------------------------------->done
when I did this it did come back with done.
- --> Now try this:
mysqladmin -u root -h linux -p extended-status
when I did this it said it failed and to check that it was running. I tried it again using localhost instead of linux and then I got the can't connect message.
- -> If it prompts you for your password, enter the one you created initially, in #3 above. If your password 'took', it should display an extended status report for the server.
Let me know the results, ok? I've gotta run, but I'll be back +/- 1 hour.
- - Carl
- -- ____________________________________________________________________ C. E. Hartung Business Development & Support Services http://www.cehartung.com/ carlh@cehartung.com Dover Foxcroft, Maine, USA Public Key #0x68396713 Reg. Linux User #350527 http://counter.li.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCEnzWusxgymg5ZxMRAjPsAJ95a77NN6HZo2ikCFWsss2qHsgatgCdE2iV RKdXpV2P7EDH34rY6sjdCs4= =yYHq -----END PGP SIGNATURE-----
Its ok take your time. My mind is turning to mush now so I guess I will return to it in the morning. Thanks so much for your help. Bob Rawlinson
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bob, I'm quoting these back in the order of relevance with comments where appropriate: | 4. Make sure the server is running from a fresh start: | | (as root) | rcmysql status -------------------------------------->running | |> When I did this it came back with unused. That means the server was *not* running in spite of ps ax | grep mysql linux:/home/carlh # rcmysql stop Shutting down service mysql---------------------------->done linux:/home/carlh # ps ax | grep mysql ~ 7017 pts/2 S+ 0:00 grep mysql - --> ps reports that my "grep mysql" process is running :-) - --> I restart mysqld and try ps again: linux:/home/carlh # rcmysql start Starting service MySQL--------------------------------->done linux:/home/carlh # ps ax | grep mysql ~ 7033 pts/2 S 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql - --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock - --datadir=/var/lib/mysql ~ 7072 pts/2 Sl 0:00 /usr/sbin/mysqld --basedir=/usr - --datadir=/var/lib/mysql --user=mysql - --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3306 - --socket=/var/lib/mysql/mysql.sock ~ 7076 pts/2 S+ 0:00 grep mysql | 1. You installed MySQL | 2. You ran, as root, "mysql_install_db" | |> If you mean "su root " then yes That works for me. | 3. Then, as root, you created a root password for the server: | ~ mysqladmin -u root password "my-password" (no quotes) | |> No when I tried to do this it came back with the no connect msg. Here is the subtle, but not hidden "gotcha!": - --> When you run "mysql_install_db " this is what happens: linux:/home/(you) # mysql_install_db Installing all prepared tables 050215 18:34:16 /usr/sbin/mysqld: **Shutdown Complete** - --> You need to restart the server first before creating your password. - --> The correct sequence: install_db->restart->password: (all as root) rcmysql start ----------------------------------------->done - --> check it's status: rcmysql status ----------------------------------------->running - --> set up the server's root password: mysqladmin -u root password "my-password" (no quotes) mysqladmin -u root -h linux password "my-password" (ditto) - --> "linux" is the host name in the second example, as you gathered. Verify the password has been set up by requesting an extended status report from the server: mysqladmin -u root -h linux -p extended-status - --> You should be prompted for the password before it displays the report. | Its ok take your time. My mind is turning to mush now so I guess I will | return to it in the morning. Thanks so much for your help. I like drinking "brain stiffeners" when that happens! Gotta Starbucks nearby? ;-) I hope this small bit actually helps you on your project. Let me know if it's still broken -- I don't think so, but ya never know! regards, - - Carl - -- ____________________________________________________________________ C. E. Hartung Business Development & Support Services http://www.cehartung.com/ carlh@cehartung.com Dover Foxcroft, Maine, USA Public Key #0x68396713 Reg. Linux User #350527 http://counter.li.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCEpIrusxgymg5ZxMRAp77AJ0dUgRvZDBp9YXQPbeDtljDYNigHgCfdyUa NgFseVW0ROXmiVSuf3Pnlv0= =jRCW -----END PGP SIGNATURE-----
Carl E. Hartung wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Bob,
That means the server was *not* running in spite of ps ax | grep mysql
linux:/home/carlh # rcmysql stop Shutting down service mysql---------------------------->done linux:/home/carlh # ps ax | grep mysql ~ 7017 pts/2 S+ 0:00 grep mysql
- --> ps reports that my "grep mysql" process is running :-) - --> I restart mysqld and try ps again:
linux:/home/carlh # rcmysql start Starting service MySQL--------------------------------->done
You were dead on on this. It wasn't running.
Here is the subtle, but not hidden "gotcha!":
- --> When you run "mysql_install_db " this is what happens:
linux:/home/(you) # mysql_install_db Installing all prepared tables 050215 18:34:16 /usr/sbin/mysqld: **Shutdown Complete**
- --> You need to restart the server first before creating your password. - --> The correct sequence: install_db->restart->password:
(all as root) rcmysql start ----------------------------------------->done
This all works as described
- --> check it's status:
rcmysql status ----------------------------------------->running
Here is were it goes wrong. I get unused once more.
- --> set up the server's root password:
mysqladmin -u root password "my-password" (no quotes)
mysqladmin -u root -h linux password "my-password" (ditto)
- --> "linux" is the host name in the second example, as you gathered.
Verify the password has been set up by requesting an extended status report from the server:
mysqladmin -u root -h linux -p extended-status
- --> You should be prompted for the password before it displays the report.
This is where I wish to be :-)
regards,
- - Carl
Carl you have been a great help. Do you have any idea how to find out why it did not start? Thanks Bob Rawlinson
On Wednesday 16 February 2005 12:02, Robert A. Rawlinson wrote: Hi Bob, At least we've got the status up to this point verified.
rcmysql status ----------------------------------------->running
Here is were it goes wrong. I get unused once more.
su in a console to /var/lib/mysql and see if there's a mysqld.log and mysqld.log-20050216 or 17.gz (midnight commander "mc" can view these.) Let me know what you see. Good thing you're nice and refreshed, now. You /are/ nice and refreshed, right? ;-) - Carl -- ____________________________________________________________________ C. E. Hartung Business Development & Support Services http://www.cehartung.com/ carlh@cehartung.com Dover Foxcroft, Maine, USA Public Key #0x68396713 Reg. Linux User #350527 http://counter.li.org/
suselinux@cehartung.com wrote:
On Wednesday 16 February 2005 12:02, Robert A. Rawlinson wrote: Hi Bob,
su in a console to /var/lib/mysql and see if there's a mysqld.log and mysqld.log-20050216 or 17.gz (midnight commander "mc" can view these.)
Well it took a few minutes to find out how to use midnight commander. Then I found: 050215 16:15:04 mysqld started 050215 16:15:05 InnoDB: Started 050215 16:15:05 Fatal error: Can't open privelege tables: Can't find file: './mysql/host.frm' (errno: 13) 050215 16:15:05 Aborting 050215 16:15:05 InnoDB: Starting shutdown... 050215 16:15:08 InnoDB: Shutdown completed 050215 16:15:08 /usr/sbin/mysqld-max: Shutdown Complete I did a locate to see if I could find that file but it didn't seem to be on the system.
Let me know what you see.
Good thing you're nice and refreshed, now. You /are/ nice and refreshed, right? ;-)
Yes! much better today - Thanks
- Carl
Bob Rawlinson
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert A. Rawlinson wrote: <snip> | 050215 16:15:04 mysqld started | 050215 16:15:05 InnoDB: Started | 050215 16:15:05 Fatal error: Can't open privelege tables: Can't find | file: './mysql/host.frm' (errno: 13) | 050215 16:15:05 Aborting | | 050215 16:15:05 InnoDB: Starting shutdown... | 050215 16:15:08 InnoDB: Shutdown completed | 050215 16:15:08 /usr/sbin/mysqld-max: Shutdown Complete Bob, I know this sounds like a repeat, but in my post before last I had you confirm that you ran mysql_install_db. I'd like you to try the procedure "from scratch" as though you'd just installed the rpm(s) with YaST. The correct sequence (off the top of my head now -- please verify) was: (all as root) mysql_install_db rcmysql start rcmysql status mysqladmin -u root -p extended-status I'm hoping you just misinterpreted what was happening at the start and can just repeat the entire procedure in the correct order to set it straight. Afterwards, if it doesn't work, check the logs in /var/lib/mysql for anything new. If it /does/ work it'll be time to move on to the next level. - - Carl - -- ____________________________________________________________________ C. E. Hartung Business Development & Support Services http://www.cehartung.com/ carlh@cehartung.com Dover Foxcroft, Maine, USA Public Key #0x68396713 Reg. Linux User #350527 http://counter.li.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFCE6bWusxgymg5ZxMRAjDxAJ9I+EYa1015cbnPDK97ODtQXdP9WACaA+YO e6jFUfd4Fl454/YPkcHtaHU= =Jo6Y -----END PGP SIGNATURE-----
On Wednesday 16 February 2005 21:02, Carl E. Hartung wrote:
Robert A. Rawlinson wrote: <snip>
| 050215 16:15:04 mysqld started | 050215 16:15:05 InnoDB: Started | 050215 16:15:05 Fatal error: Can't open privelege | tables: Can't find file: './mysql/host.frm' (errno: | 13)
I've had permission and group:owner errors on this one before. An installation that works has: /var/lib/mysql mysql:mysql drwx------ and under that: host.frm mysql:mysql -rw-rw---- Another installation that works has everything mysql:daemon Just trying to give another slant as I've been here myself. When it clicks you'll know.
Carl E. Hartung wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Robert A. Rawlinson wrote: <snip> | 050215 16:15:04 mysqld started | 050215 16:15:05 InnoDB: Started | 050215 16:15:05 Fatal error: Can't open privelege tables: Can't find | file: './mysql/host.frm' (errno: 13) | 050215 16:15:05 Aborting | | 050215 16:15:05 InnoDB: Starting shutdown... | 050215 16:15:08 InnoDB: Shutdown completed | 050215 16:15:08 /usr/sbin/mysqld-max: Shutdown Complete
Bob,
I know this sounds like a repeat, but in my post before last I had you confirm that you ran mysql_install_db. I'd like you to try the procedure "from scratch" as though you'd just installed the rpm(s) with YaST. The correct sequence (off the top of my head now -- please verify) was:
(all as root) mysql_install_db
I got the messages like you sent on a previous e-mail. This looked like everything was ok with no error messages.
rcmysql start
I got an indication of start which looked ok
rcmysql status
This gave me the unused message. Then I looked in the log for today and found the time I ran it. it again showed the error: Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm ' (errno: 13) I also tryed the ls -l /var/lib/mysql that someone suggested and it returned: drwxr--xr-x 4 mysql daemon 296 2005-02-16 14:42 . drwxr--xr-x 32 root root 896 2005-02-16 04:19 .. However the host.frm file is not there.
mysqladmin -u root -p extended-status
I'm hoping you just misinterpreted what was happening at the start and can just repeat the entire procedure in the correct order to set it straight. Afterwards, if it doesn't work, check the logs in /var/lib/mysql for anything new. If it /does/ work it'll be time to move on to the next level.
- - Carl
- --
It just seems that files are missing and do not get created if mysql_install_db is supposed to create them. Bob Rawlinson
Robert A. Rawlinson wrote:
I got the messages like you sent on a previous e-mail. This looked like everything was ok with no error messages.
rcmysql start
I got an indication of start which looked ok
rcmysql status
This gave me the unused message. Then I looked in the log for today and found the time I ran it. it again showed the error: Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm ' (errno: 13) I also tryed the ls -l /var/lib/mysql that someone suggested and it returned: drwxr--xr-x 4 mysql daemon 296 2005-02-16 14:42 . drwxr--xr-x 32 root root 896 2005-02-16 04:19 .. However the host.frm file is not there. ... It just seems that files are missing and do not get created if mysql_install_db is supposed to create them.
Hi Bob, Here's what I see at my end for ownership & permissions: under /var/lib drwxr-xr-x 4 mysql mysql 312 2005-02-16 12:10 mysql/ under /var/lib/mysql drwx------ 2 mysql mysql 624 2005-01-23 20:53 mysql -rw-rw---- 1 mysql mysql 161 2005-02-16 12:10 mysqld.log -rw-r--r-- 1 root root 211 2005-01-24 11:15 mysqld.log-20050124.gz -rw-r--r-- 1 root root 235 2005-01-25 11:15 mysqld.log-20050125.gz -rw-r--r-- 1 root root 463 2005-02-16 04:15 mysqld.log-20050216.gz -rw-rw---- 1 mysql mysql 6 2005-02-16 12:10 mysqld.pid srwxrwxrwx 1 mysql mysql 0 2005-02-16 12:10 mysql.sock drwx------ 2 mysql mysql 48 2005-01-22 15:24 test under /var/lib/mysql/mysql -rw-rw---- 1 mysql mysql 8778 2005-01-22 15:25 columns_priv.frm -rw-rw---- 1 mysql mysql 0 2005-01-22 15:25 columns_priv.MYD -rw-rw---- 1 mysql mysql 1024 2005-01-22 15:25 columns_priv.MYI -rw-rw---- 1 mysql mysql 9088 2005-01-22 15:24 db.frm -rw-rw---- 1 mysql mysql 306 2005-01-22 15:25 db.MYD -rw-rw---- 1 mysql mysql 3072 2005-01-22 15:25 db.MYI -rw-rw---- 1 mysql mysql 8641 2005-01-22 15:25 func.frm -rw-rw---- 1 mysql mysql 0 2005-01-22 15:25 func.MYD -rw-rw---- 1 mysql mysql 1024 2005-01-22 15:25 func.MYI -rw-rw---- 1 mysql mysql 9064 2005-01-22 15:25 host.frm -rw-rw---- 1 mysql mysql 0 2005-01-22 15:25 host.MYD -rw-rw---- 1 mysql mysql 1024 2005-01-22 15:25 host.MYI -rw-rw---- 1 mysql mysql 8877 2005-01-22 15:25 tables_priv.frm -rw-rw---- 1 mysql mysql 0 2005-01-22 15:25 tables_priv.MYD -rw-rw---- 1 mysql mysql 1024 2005-01-22 15:25 tables_priv.MYI -rw-rw---- 1 mysql mysql 9806 2005-01-22 15:25 user.frm -rw-rw---- 1 mysql mysql 8730 2005-01-23 20:53 user_info.frm -rw-rw---- 1 mysql mysql 0 2005-01-23 20:53 user_info.MYD -rw-rw---- 1 mysql mysql 1024 2005-01-23 20:53 user_info.MYI -rw-rw---- 1 mysql mysql 224 2005-02-15 16:45 user.MYD -rw-rw---- 1 mysql mysql 2048 2005-02-15 16:53 user.MYI Do you have the same files and directory structure? - Carl -- ____________________________________________________________________ C. E. Hartung Business Development & Support Services http://www.cehartung.com/ carlh@cehartung.com Dover Foxcroft, Maine, USA Public Key #0x68396713 Reg. Linux User #350527 http://counter.li.org/
participants (4)
-
Carl E. Hartung
-
Robert A. Rawlinson
-
steve
-
suselinux@cehartung.com