Re: Can't start MYSQL on Linux
Dear Ling, Thank you so much. Can I ask why? you have to keep in mind that the mysqld (that's the MySQL server, or the daemon) is the only one that must have read/write access to datadir (the database directories). On your machine, /var/lib/mysql/ is datadir, and mysqld will run as user mysql by default. If mysql is the owner of the datadir directories and files, mysqld will have read/write access to your databases and tables, otherwise it has not. Regards, -- Stefan Hinz Geschäftsführer / CEO iConnect e-commerce solutions GmbH # www.js-webShop.com www.iConnect.de # Gustav-Meyer-Allee 25, 13355 Berlin # Tel: +49-30-46307-382 Fax: +49-30-46307-388 - Original Message - From: Ling Wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 3:51 AM Subject: Re: Can't start MYSQL on Linux Yes, that's it. It worked!!! Thank you so much. Can I ask why? Ling From: Gerald Clark [EMAIL PROTECTED] To: Ling Wang [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Can't start MYSQL on Linux Date: Tue, 07 Aug 2001 10:29:21 -0500 chown -R mysql /var/lib/mysql Ling Wang wrote: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . It always ends immediately. When I look at the /var/log/mysql.log, the message says: mysql started /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) mysql ended I tried start safe_mysqld from many directories and without any success. Can anyone please help me out? Thanks. Ling Wang _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Gerald L. Clark [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
I got it. Thank you very very much for the help. Ling From: Trond Eivind Glomsrød [EMAIL PROTECTED] To: Ling Wang [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Can't start MYSQL on Linux Date: Tue, 7 Aug 2001 23:03:41 -0400 (EDT) On Wed, 8 Aug 2001, Ling Wang wrote: I have to login as root user to do mysql_install_db and safe_mysqld . Otherwise I will get permission denied message. You already made those files, and they're owned by root. You can't overwrite them that way. Just do a chown before you start the database. How come when I type service mysqld start, Linux says command not found? I could not find the command chkconfig either. Both are not path of a user's path[1] - they're admin tools, and are for the use of root. Root can also control which services start with tksysv and ntsysv. [1] They're in /sbin, for the curious. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
on 8/6/01 10:13 PM, Trond Eivind Glomsrød at [EMAIL PROTECTED] wrote: Ling Wang [EMAIL PROTECTED] writes: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . You're not supposed to. To start mysql, as any service, do snip What you've done (and too many others, where do they get this idea?) um, perhaps from the INSTALL-SOURCE notes that come with the mysql distribution quote from the aforementioned INSTALL-SOURCE After everything has been unpacked and installed, you should initialize and test your distribution. You can start the *MySQL* server with the following command: shell bin/safe_mysqld --user=mysql /quote i believe it's the way most of the world does it. is that you've created the database files as root. Then you start the database, which will run as mysql. This user can obviously not write to root's files. Change the ownership manually, and try again - with service mysqld start. -- mike cullerton - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
chown -R mysql /var/lib/mysql Ling Wang wrote: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . It always ends immediately. When I look at the /var/log/mysql.log, the message says: mysql started /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) mysql ended I tried start safe_mysqld from many directories and without any success. Can anyone please help me out? Thanks. Ling Wang _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Gerald L. Clark [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
Dear Wang, /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) It's tricky, but you have to install the two databases (mysql and test) shipped along with the MySQL distribution. Here's that part: shell ./scripts/mysql_install_db And here's the manual part: http://www.mysql.com/doc/P/o/Post-installation.html Regards, -- Stefan Hinz Geschäftsführer / CEO iConnect e-commerce solutions GmbH # www.js-webShop.com www.iConnect.de # Gustav-Meyer-Allee 25, 13355 Berlin # Tel: +49-30-46307-382 Fax: +49-30-46307-388 - Original Message - From: Ling Wang [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 4:02 AM Subject: Can't start MYSQL on Linux I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . It always ends immediately. When I look at the /var/log/mysql.log, the message says: mysql started /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) mysql ended I tried start safe_mysqld from many directories and without any success. Can anyone please help me out? Thanks. Ling Wang _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
mike cullerton [EMAIL PROTECTED] writes: on 8/6/01 10:13 PM, Trond Eivind Glomsrød at [EMAIL PROTECTED] wrote: Ling Wang [EMAIL PROTECTED] writes: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . You're not supposed to. To start mysql, as any service, do snip What you've done (and too many others, where do they get this idea?) um, perhaps from the INSTALL-SOURCE notes that come with the mysql distribution But you didn't install from source. It comes with a Linux distribution, and is started as other services there (same way as the LSB standard specifies). shell bin/safe_mysqld --user=mysql If that is done, and mysql_install_db is run as root, I don't see that working either. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
I have to login as root user to do mysql_install_db and safe_mysqld . Otherwise I will get permission denied message. How come when I type service mysqld start, Linux says command not found? I could not find the command chkconfig either. Your idea does not work for me. Thanks anyhow. Ling From: [EMAIL PROTECTED] (Trond Eivind Glomsrød) To: Ling Wang [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Can't start MYSQL on Linux Date: 07 Aug 2001 00:13:51 -0400 Ling Wang [EMAIL PROTECTED] writes: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . You're not supposed to. To start mysql, as any service, do service mysqld start (which is equivalent to running the initscript like this /etc/init.d/mysqld start). This will automatically initialize the database the first time it runs. To make it start when your system starts, do chkconfig mysqld on What you've done (and too many others, where do they get this idea?) is that you've created the database files as root. Then you start the database, which will run as mysql. This user can obviously not write to root's files. Change the ownership manually, and try again - with service mysqld start. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
On Wed, 8 Aug 2001, Ling Wang wrote: I have to login as root user to do mysql_install_db and safe_mysqld . Otherwise I will get permission denied message. You already made those files, and they're owned by root. You can't overwrite them that way. Just do a chown before you start the database. How come when I type service mysqld start, Linux says command not found? I could not find the command chkconfig either. Both are not path of a user's path[1] - they're admin tools, and are for the use of root. Root can also control which services start with tksysv and ntsysv. [1] They're in /sbin, for the curious. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
Yes, that's it. It worked!!! Thank you so much. Can I ask why? Ling From: Gerald Clark [EMAIL PROTECTED] To: Ling Wang [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Can't start MYSQL on Linux Date: Tue, 07 Aug 2001 10:29:21 -0500 chown -R mysql /var/lib/mysql Ling Wang wrote: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . It always ends immediately. When I look at the /var/log/mysql.log, the message says: mysql started /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) mysql ended I tried start safe_mysqld from many directories and without any success. Can anyone please help me out? Thanks. Ling Wang _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Gerald L. Clark [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Can't start MYSQL on Linux
I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . It always ends immediately. When I look at the /var/log/mysql.log, the message says: mysql started /usr/libexec/mysql: Can't find file './mysql/host.frm' (errno: 13) mysql ended I tried start safe_mysqld from many directories and without any success. Can anyone please help me out? Thanks. Ling Wang _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Can't start MYSQL on Linux
Ling Wang [EMAIL PROTECTED] writes: I have a fresh installed Linux 7.1 from Redhat. The mysal 3.23.36 was installed together with the Redhat Linux. I can not start the mysql server by executing /usr/bin/safe_mysqld . You're not supposed to. To start mysql, as any service, do service mysqld start (which is equivalent to running the initscript like this /etc/init.d/mysqld start). This will automatically initialize the database the first time it runs. To make it start when your system starts, do chkconfig mysqld on What you've done (and too many others, where do they get this idea?) is that you've created the database files as root. Then you start the database, which will run as mysql. This user can obviously not write to root's files. Change the ownership manually, and try again - with service mysqld start. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php