#1 MySQL stopped shortly after being started?
Posted: Wed Dec 13, 2006 4:23 am
I have to admit, I'm pretty much a MySQL newbie.
I just installed MySQL 5.0.27-0 on Red Hat Enterprise Linux 4ES. My kernel is 2.6.9-5.0.5.EL. I have successfully installed the following RPMs with the -ivh options:
(1) perl-DBI-1.40-5.i386.rpm (pre-requisite, actually)
(2) MySQL-server-standard-5.0.27-0.rhel4.i386.rpm
(3) MySQL-client-standard-5.0.27-0.rhel4.i386.rpm
All installations have been successful. The executable files (such as mysqld_safe and mysqladmin) are located in the /usr/bin directory.
Like I said, I'm a goddamn newbie in this product, so I merely followed the steps descibed in the refman-5.0-en.a4.pdf file. :(
The documentation said that when doing rpm installation (as opposed to src installation), the mysql_install_db is automatically executed upon the installation. So I figure out the next step is starting the sql daemon, as follows:
Whoa, what's that supposed to mean? Why the service was being stopped just shortly after it was started?
Naturally, when I tried executing mysqladmin, it failed:
Probably the RPM installation did not execute the mysql_install_db command? Just to make sure, I deleted the group mysql, the user mysql, re-created them again, and re-executed mysql_install_db:
I guess the installation was successful. However, when I tried to execute the mysqld_safe, it just failed again:
What's going on, actually? :thewall:
I just installed MySQL 5.0.27-0 on Red Hat Enterprise Linux 4ES. My kernel is 2.6.9-5.0.5.EL. I have successfully installed the following RPMs with the -ivh options:
(1) perl-DBI-1.40-5.i386.rpm (pre-requisite, actually)
(2) MySQL-server-standard-5.0.27-0.rhel4.i386.rpm
(3) MySQL-client-standard-5.0.27-0.rhel4.i386.rpm
All installations have been successful. The executable files (such as mysqld_safe and mysqladmin) are located in the /usr/bin directory.
Like I said, I'm a goddamn newbie in this product, so I merely followed the steps descibed in the refman-5.0-en.a4.pdf file. :(
The documentation said that when doing rpm installation (as opposed to src installation), the mysql_install_db is automatically executed upon the installation. So I figure out the next step is starting the sql daemon, as follows:
Code: Select all
[root@iceheart-rhel4es bin]# ./mysqld_safe &
[1] 3933
[root@iceheart-rhel4es bin]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/iceheart-rhel4es.pid
061215 18:10:25 mysqld ended
[1]+ Done ./mysqld_safe
Naturally, when I tried executing mysqladmin, it failed:
Code: Select all
[root@iceheart-rhel4es bin]# ./mysqladmin version
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
Code: Select all
[root@iceheart-rhel4es bin]# mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h iceheart-rhel4es password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd / ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Code: Select all
[root@iceheart-rhel4es bin]# ./mysqld_safe --user=mysql &
[1] 3963
[root@iceheart-rhel4es bin]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/lib/mysql/iceheart-rhel4es.pid
061215 18:16:59 mysqld ended
[1]+ Done ./mysqld_safe --user=mysql