Mailinglist Archive: opensuse (2912 mails)

< Previous Next >
Re: [SLE] mySQL startup problem
  • From: "Carl E. Hartung" <suselinux@xxxxxxxxxxxxx>
  • Date: Tue, 15 Feb 2005 19:22:44 -0500
  • Message-id: <42129254.3080401@xxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bob,

I'm quoting these back in the order of relevance with comments where
appropriate:

| 4. Make sure the server is running from a fresh start:
|
| (as root)
| rcmysql status -------------------------------------->running
|
|> When I did this it came back with unused.

That means the server was *not* running in spite of ps ax | grep mysql

linux:/home/carlh # rcmysql stop
Shutting down service mysql---------------------------->done
linux:/home/carlh # ps ax | grep mysql
~ 7017 pts/2 S+ 0:00 grep mysql

- --> ps reports that my "grep mysql" process is running :-)
- --> I restart mysqld and try ps again:

linux:/home/carlh # rcmysql start
Starting service MySQL--------------------------------->done

linux:/home/carlh # ps ax | grep mysql
~ 7033 pts/2 S 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql
- --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock
- --datadir=/var/lib/mysql
~ 7072 pts/2 Sl 0:00 /usr/sbin/mysqld --basedir=/usr
- --datadir=/var/lib/mysql --user=mysql
- --pid-file=/var/lib/mysql/mysqld.pid --skip-locking --port=3306
- --socket=/var/lib/mysql/mysql.sock
~ 7076 pts/2 S+ 0:00 grep mysql

| 1. You installed MySQL
| 2. You ran, as root, "mysql_install_db"
|
|> If you mean "su root " then yes

That works for me.

| 3. Then, as root, you created a root password for the server:
| ~ mysqladmin -u root password "my-password" (no quotes)
|
|> No when I tried to do this it came back with the no connect msg.

Here is the subtle, but not hidden "gotcha!":

- --> When you run "mysql_install_db " this is what happens:

linux:/home/(you) # mysql_install_db
Installing all prepared tables
050215 18:34:16 /usr/sbin/mysqld: **Shutdown Complete**

- --> You need to restart the server first before creating your password.
- --> The correct sequence: install_db->restart->password:

(all as root)
rcmysql start ----------------------------------------->done

- --> check it's status:

rcmysql status ----------------------------------------->running

- --> set up the server's root password:

mysqladmin -u root password "my-password" (no quotes)

mysqladmin -u root -h linux password "my-password" (ditto)

- --> "linux" is the host name in the second example, as you gathered.

Verify the password has been set up by requesting an extended status
report from the server:

mysqladmin -u root -h linux -p extended-status

- --> You should be prompted for the password before it displays the report.

| Its ok take your time. My mind is turning to mush now so I guess I will
| return to it in the morning. Thanks so much for your help.

I like drinking "brain stiffeners" when that happens! Gotta Starbucks
nearby? ;-) I hope this small bit actually helps you on your project.
Let me know if it's still broken -- I don't think so, but ya never know!

regards,

- - Carl


- --
____________________________________________________________________
C. E. Hartung Business Development & Support Services
http://www.cehartung.com/ carlh@xxxxxxxxxxxxx
Dover Foxcroft, Maine, USA Public Key #0x68396713
Reg. Linux User #350527 http://counter.li.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCEpIrusxgymg5ZxMRAp77AJ0dUgRvZDBp9YXQPbeDtljDYNigHgCfdyUa
NgFseVW0ROXmiVSuf3Pnlv0=
=jRCW
-----END PGP SIGNATURE-----

< Previous Next >
Follow Ups