473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How do I start MySQL?

I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail
server running for several months. It took me a week or so to get it up
and running in September. Now, I did a clean upgrade to Mandrake 9.2
and am reinstalling everything. This thing is kicking my ass and I
can't seem to get past it. I could really use some help if anybody has any.

Just for reference, this was my primary source for information on
installation and setup, though I've been scouring Google for help:
http://high5.net/howto/

Of course, there's also the MySQL manual:
http://www.mysql.com/doc/en/index.html

I am trying to get MySQL to start automatically at boot. Initially it
did start, but it was a runaway process -- mysqld_safe and mysql process
apperared in the process table, died and respawned quickly soaking up
100% of my CPU processor cycles (see below). I'm not sure what caused
it to stop initializing on boot, but there was a lot of configuration
done with Postfix and Courier-IMAP.

I've copied mysql.server to the /etc/rc.d/init.d directory. It didn't
help. I have worked with "chkconfig" and it hasn't helped. As you can
see from this fragment of "chkconfig --list", it is in the list to run
under inits 2-5, but it just doesn't start.

[root@adamsmdk courier]# chkconfig --list
httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
..
..
..
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
..
..
..
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
courier-imap 0:off 1:off 2:on 3:on 4:on 5:on 6:off

If I start the MySQL server through Webmin or at the command line
(/etc/rc.d/init.d/mysql start), the process runs away just as it did
when it used to start at boot. -- I get a series of instances of mysqld
and mysqld_safe in the process tables that take turns spawning and
dying, and constantly soak up processor cycles thrashing around. It's
very hard to kill this process. I have to execute "/usr/sbin/mysqld
stop" repeatedly and rapidly at the command line as root to shut it down.

If I start the server at the command line as root with "mysqld_safe
--skip-grant-tables &" I get a polite set of 3 instances of mysql and
one mysqld_safe. They appear to function normally, but webmin reports
that mysql server is not running and can't start it -- reports no error,
just that it isn't running and database list can not be retrieved. I
assume that for whatever reason, Webmin can't see the process running.

Stopping this server is also next to impossible. When I issue "mysqld
stop" at the command line (root or user) I get:

[madams@adamsmdk init.d]$ /usr/sbin/mysqld stop
040101 22:22:41 Can't start server: Bind on TCP/IP port: Address
already in use
040101 22:22:41 Do you already have another mysqld server running on
port: 3306 ?
040101 22:22:41 Aborting

040101 22:22:41 /usr/sbin/mysqld: Shutdown Complete

This does not alter the process in the proc. table:

[madams@adamsmdk init.d]$ ps -aux|grep mysql
Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 24677 0.0 0.2 2456 1256 pts/4 S 22:13 0:00 /bin/sh
/usr/bin/mysqld_safe --skip-grant-tables
mysql 24693 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
mysql 24694 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
mysql 24695 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
madams 24823 0.0 0.1 1828 608 pts/0 R 22:25 0:00 grep mysql

"Killing" the process as root also has no effect. I have to use the
command line buffer to stuff "mysqld stop" from 3 to 30 times in rapid
succession or sometimes this works:

[root@adamsmdk madams]# mysqld_safe stop
Starting mysqld daemon with databases from /var/lib/mysql
040102 12:56:47 mysqld ended

[root@adamsmdk madams]# mysqld_safe stop
Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: line 1: 25790 Killed nohup
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking stop
/var/lib/mysql/adamsmdk.err 2>&1

040102 12:56:52 mysqld ended

Notice that I had to send that command twice.

I tried mysql_fix_privilege_tables --password=root_password and thought
that fixed it. But it did not. I uninstalled and reinstalled all the
MySQL elements it -- no change.

How can I start this thing so that it runs properly and how can I get it
to do so automatically at boot?

Thanks.

Mark

Jul 19 '05 #1
0 5816

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
0
by: Massimiliano Marcon | last post by:
I'm triyng to install mysql server with rpm on a linux red hat 9.0 machine. The installation was succesfully, but now I can't start the server. I think the right command is mysqld_safe --user=mysql...
2
by: Derek | last post by:
Hello Sorry if this has been asked before but here we go any way. I am running Mandrake Linux 9 with MYSQL 3.23.52 ( I know not the latest but it did work). I have been running/using the...
5
by: KC | last post by:
Hello I installed MySQL ver 4.0.20d on a Windows XP Professional PC. I created a user and database that I would like to delete, and at this point I would just like to uninstall MySQL and do a...
13
by: sandwich_eater | last post by:
I installed and started MySQL on Mandriva 10.x and get an "Error" on screen after a series of "." appears. Where to look for the log?
2
by: Chris Song | last post by:
Hello, I'v installed mysql 5.0 (MySQL-server-standard-5.0.27-0.rhel4.i386.rpm) on RedHat AS4. When I start mysql through command line (i.e. /usr/bin/mysqld_safe --datadir=/var/lib/mysql...
4
by: Bob | last post by:
Hi, I would like to periodically start and stop mysql on a schedule using something like the Windows scheduler. Does anyone know a good way to do this? Thanks, Bob
0
by: rabbit | last post by:
Hello, I am really stuck with the following problem and I have tried almost all options I could find on Google to no avail. I recently installed the rpm version of MySQL server 5.0.26 on Fedora...
1
by: TechnoAtif | last post by:
Could not start the mysql service on localcomputer Error 1067:The process terminated unexpectedly. ------------------------------------------------------------------------------ Hi All. I 'm...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.