>>Running /etc/rc.d/init.d/mysqld start says that mysql start failed BUT
 
This doesn't nesessarily mean that mysql hasn't started. This script waits
only for certain time to check if mysql has started or not. If it is not
started in that time, it simply says 'mysql start failed'. But mysql may
take some more time to come up. So the best practice is to have a look at
the logs (as you rightly did) to find out what exactly is going on.
And your logs anyway are saying "/usr/libexec/mysqld: ready for
connections.". This means that mysql has started without any problems and
waiting for connections. 

>>ps -aux shows that mysql is running

And for the same reason I mentioned above, you are seeing this.

Hope this helps.

sujay

-----Original Message-----
From: Sanjay Arora [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 14, 2005 4:46 PM
To: MySql Mailing List
Subject: Newbie Query: Error starting MySQL..changed Data Directory

Hi all

First usage of MySQL. Newbie in Linux as well as MySQL. Using CentOS 4.2
with MySQL 4.1.12, rpm install.

Changed the data directory.

My /etc/my.conf
[mysqld]
datadir=/home.dbdata/mysql
socket=/home.dbdata/mysql/mysql.sock


# Default to using old password format for compatibility with mysql 3.x #
clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Ran these commands for permissions:
chown -R mysql:mysql /home.dbdata/mysql
chmod -R go-rwx  /home.dbdata/mysql

Running /etc/rc.d/init.d/mysqld start says that mysql start failed BUT

ps -aux shows that mysql is running

0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pidmysql
6184  0.2  3.4 125808 17636 pts/0  Sl   15:47   0:01 /usr/libexec/mysqld
--defaults-file=/etc/my.cnf --basedir=/usrroot      6336  0.0  0.1  2920
744 pts/0    R+   15:57   0:00 ps -aux

Log shows
051114 14:51:07  mysqld started
051114 14:51:08  InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections.
Version: '4.1.12'  socket: '/home.dbdata/mysql/mysql.sock'  port: 3306
Source distribution
051114 15:47:06 [Note] /usr/libexec/mysqld: Normal shutdown

051114 15:47:06  InnoDB: Starting shutdown...
051114 15:47:09  InnoDB: Shutdown completed; log sequence number 0 43634
051114 15:47:09 [Note] /usr/libexec/mysqld: Shutdown complete

051114 15:47:09  mysqld ended

051114 15:47:33  mysqld started
051114 15:47:33  InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections.
Version: '4.1.12'  socket: '/home.dbdata/mysql/mysql.sock'  port: 3306
Source distribution


Please advise what I have done wrong. I suspect permissions &/or incorrect
data directory migration. Please help.

With regards.
Sanjay.






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to