LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-13-2006, 04:38 AM   #1
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Rep: Reputation: 15
MySQL stopped shortly after being started :(


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:
Code:
[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
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:
Code:
[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!
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:
Code:
[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
I guess the installation was successful. However, when I tried to execute the mysqld_safe, it just failed again:
Code:
[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
What's going on, actually?

Last edited by Kreshna; 12-13-2006 at 04:40 AM.
 
Old 12-13-2006, 08:29 PM   #2
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Original Poster
Rep: Reputation: 15
Hold on, I found something:

Code:
[root@iceheart-rhel4es log]# cat /var/lib/mysql/iceheart-rhel4es.err
061215 17:46:03  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
061215 17:46:03  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
061215 17:46:04  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
061215 17:46:04  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
061215 17:46:05  InnoDB: Started; log sequence number 0 0
061215 17:46:05 [ERROR] Can't start server: Bind on TCP/IP port: Address already           in use
061215 17:46:05 [ERROR] Do you already have another mysqld server running on por          t: 3306 ?
061215 17:46:05 [ERROR] Aborting

061215 17:46:05  InnoDB: Starting shutdown...
061215 17:46:07  InnoDB: Shutdown completed; log sequence number 0 43655
061215 17:46:07 [Note] /usr/sbin/mysqld: Shutdown complete

061215 17:46:07  mysqld ended

061215 17:47:03  mysqld started
061215 17:47:03  InnoDB: Started; log sequence number 0 43655
061215 17:47:03 [ERROR] Can't start server: Bind on TCP/IP port: Address already           in use
061215 17:47:03 [ERROR] Do you already have another mysqld server running on por          t: 3306 ?
061215 17:47:03 [ERROR] Aborting

061215 17:47:03  InnoDB: Starting shutdown...
061215 17:47:05  InnoDB: Shutdown completed; log sequence number 0 43655
061215 17:47:05 [Note] /usr/sbin/mysqld: Shutdown complete

061215 17:47:05  mysqld ended

061215 17:51:55  mysqld started
061215 17:51:55  InnoDB: Started; log sequence number 0 43655
061215 17:51:55 [ERROR] Can't start server: Bind on TCP/IP port: Address already           in use
061215 17:51:55 [ERROR] Do you already have another mysqld server running on por          t: 3306 ?
061215 17:51:55 [ERROR] Aborting

061215 17:51:55  InnoDB: Starting shutdown...
061215 17:51:57  InnoDB: Shutdown completed; log sequence number 0 43655
061215 17:51:57 [Note] /usr/sbin/mysqld: Shutdown complete

061215 17:51:57  mysqld ended

061215 18:10:23  mysqld started
061215 18:10:23  InnoDB: Started; log sequence number 0 43655
061215 18:10:23 [ERROR] Can't start server: Bind on TCP/IP port: Address already           in use
061215 18:10:23 [ERROR] Do you already have another mysqld server running on por          t: 3306 ?
061215 18:10:23 [ERROR] Aborting

061215 18:10:23  InnoDB: Starting shutdown...
061215 18:10:25  InnoDB: Shutdown completed; log sequence number 0 43655
061215 18:10:25 [Note] /usr/sbin/mysqld: Shutdown complete

061215 18:10:25  mysqld ended

061215 18:16:57  mysqld started
061215 18:16:57  InnoDB: Started; log sequence number 0 43655
061215 18:16:57 [ERROR] Can't start server: Bind on TCP/IP port: Address already           in use
061215 18:16:57 [ERROR] Do you already have another mysqld server running on por          t: 3306 ?
061215 18:16:57 [ERROR] Aborting

061215 18:16:57  InnoDB: Starting shutdown...
061215 18:16:59  InnoDB: Shutdown completed; log sequence number 0 43655
061215 18:16:59 [Note] /usr/sbin/mysqld: Shutdown complete

061215 18:16:59  mysqld ended

I'm particularly interested in the following line:
Code:
061215 18:10:23 [ERROR] Can't start server: Bind on TCP/IP port: Address already  in use
I, uh, also have Oracle on the Linux server, and it uses port numbers from 1024 to 65000, as evident from the content of the sysctl file:
Code:
net.ipv4.ip_local_port_range = 1024 65000
I assume that's the cause? ops:
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mysql not started dudulz *BSD 2 07-10-2006 03:52 AM
CUPS can't be started or stopped BobNutfield Linux - Software 2 07-03-2006 03:07 PM
Getting Started with Apache, PHP and MYSQL jammyjames Linux - Software 1 08-30-2005 09:57 AM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 09:15 AM
Too many MySQL daemons started: Fedora casey0999 Linux - Software 3 09-24-2004 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration