469,949 Members | 2,546 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

startup script problem


Hi,

I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.

After reading the security section of the manual from
http://dev.mysql.com, I added passwords for the 'root' accounts.

However, now the startup script (/etc/rc.d/init.d/mysqld) fails.

I tried adding:

[mysql.server]
password=xxx

into /etc/my.cnf

but it did not help.

How/where do I set the password to for the startup script to allow
it to run OK ?

Thanks,
John.

Jul 23 '05 #1
8 1470
John wrote:
How/where do I set the password to for the startup script to allow
it to run OK ?


I don't know what you are doing, but I have never set any passwords for
the startup scripts. The root password needs to be used only when you
want to login into mysql as root.
Jul 23 '05 #2
Aggro wrote:
John wrote:
How/where do I set the password to for the startup script to allow
it to run OK ?

I don't know what you are doing, but I have never set any passwords for
the startup scripts. The root password needs to be used only when you
want to login into mysql as root.


I'll post '/etc/rc.d/init.d/mysqld' if that will help, but as I have
not altered it, it should be very stanard stuff.

So why would setting a password for the root accounts cause that script
to fail ?

If it helps ?

mysql> SELECT Host, User FROM mysql.user;
+-----------+----------+
| Host | User |
+-----------+----------+
| grommet | root |
| localhost | root |
+-----------+----------+

Thanks,
John.

Jul 23 '05 #3
John wrote:
So why would setting a password for the root accounts cause that script
to fail ?


How exactly did you set the root password?
Jul 23 '05 #4
Aggro wrote:
John wrote:
So why would setting a password for the root accounts cause that script
to fail ?

How exactly did you set the root password?


Either:

shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'grommet' = PASSWORD('newpwd');
mysql> FLUSH PRIVILEGES;
mysql> exit

or:

shell> mysqladmin -u root password "newpwd"
shell> mysqladmin -u root -h host_name password "newpwd"
Would it make a difference ?

Thanks,
John.

Jul 23 '05 #5
John wrote:
Would it make a difference ?


Sorry, I have no idea why setting the password could cause the script to
fail. I have set the password for root on both Windows and Linux
machines and I have never experienced problems with the startup script.
I have also never edited my.cnf for that matter. "set password" from
mysql console has always done the trick.

Only things that come to my mind that you could try are:
- Reset the root password back to empty and see if it works
- Backup your tables, uninstall mysql and then reinstall it
Jul 23 '05 #6
I think there is another couse why the script does not work. Did it
start working after removing passwords? what error messages do you
get?

Also have a look in the error log (usually in
/var/lib/mysql/[SERVERNAME].err)..

//Jesper
John <jo********@mini-net.co.uk> wrote in message news:<11*************@corp.supernews.com>...
Hi,

I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.

After reading the security section of the manual from
http://dev.mysql.com, I added passwords for the 'root' accounts.

However, now the startup script (/etc/rc.d/init.d/mysqld) fails.

I tried adding:

[mysql.server]
password=xxx

into /etc/my.cnf

but it did not help.

How/where do I set the password to for the startup script to allow
it to run OK ?

Thanks,
John.

Jul 23 '05 #7
Jesper,

Yes, it starts up fine without passwords - always has.

I don't have any error file in /var/lib/mysql/ - only the data bases.

The only error I can see is in /var/log/messages:

mysqld: Starting MySQL: failed

which does not help much (I know).
Thanks,
John.
Jesper wrote:
I think there is another couse why the script does not work. Did it
start working after removing passwords? what error messages do you
get?

Also have a look in the error log (usually in
/var/lib/mysql/[SERVERNAME].err)..

//Jesper
John <jo********@mini-net.co.uk> wrote in message news:<11*************@corp.supernews.com>...
Hi,

I'm using mysql-server-3.23.58-4 on a Linux (Fedora 1) machine.

After reading the security section of the manual from
http://dev.mysql.com, I added passwords for the 'root' accounts.

However, now the startup script (/etc/rc.d/init.d/mysqld) fails.

I tried adding:

[mysql.server]
password=xxx

into /etc/my.cnf

but it did not help.

How/where do I set the password to for the startup script to allow
it to run OK ?

Thanks,
John.


Jul 23 '05 #8
John wrote:
The only error I can see is in /var/log/messages:


I got the mysql.err file at (only root is allowed to read it in my system):

/var/log/mysql/mysql.err

You could also try to search for filenames called mysql.err, if you
can't find it from there.
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Lynn | last post: by
reply views Thread by Duane Winner | last post: by
4 posts views Thread by Jesper | last post: by
9 posts views Thread by Harry Smith | last post: by
reply views Thread by Stuart Shay | last post: by
reply views Thread by Sim Zacks | last post: by
3 posts views Thread by traceable1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.