Re: [rock-user] Re : Re : Mysql installation cannot connec…

ROCK Mailing List Archives

Attachments
Entire message
+ (text/plain)
Author: Michael Obster
Date:  
To: ROCK Users Mailing List, philippe.florent123
Subject: Re: [rock-user] Re : Re : Mysql installation cannot connect, cannot start
Hi Philippe,

To make the steps clear, I give a summary what to do.

1. Run the command mysql_init_db (this should also create the directory
(/var/opt/mysql) as root [This initialize the System-DB where MySQL
stores the users and so on]
2. Do a "chown -R mysql:mysql /var/opt/mysql" for changing the owner to
the correct user [MySQL is running as user mysql so the databases must
be owned by mysql]
3. Try /opt/mysql/bin/mysqld_safe. If it still isn't running, look at
/var/opt/mysql/<hostname>.err [This is the final check if steps 1 and 2
were sucessfull]

After these steps a "/etc/init.d/mysql start" should work.

Regards,
Michael Obster

Stefan Fiedler schrieb:
> Am Donnerstag, 23. November 2006 14:41 schrieb Stefan Fiedler:
>> Am Donnerstag, 23. November 2006 11:49 schrieb philippe florent:
>>> I don't understand,
>>> 1st time i launch mysqld_safe , it gives error, cannot find log file .err
>>> then second time, it cannot find the mysqld
>>> now it can find it but i got an error saying I cannot start the mysql
>>> daemon as root, i cannot find the security pages in man...
> ...
>> Running mysqld_safe requires the /var/opt/mysql directory to exist. I used
>> the following permissions:
>> drwxr-xr-x 2 root root 4096 2006-11-23 14:04 /var/opt/mysql/
>> Maybe this directory is created by another mysql program, or it should be
>> part of the mysql package, I'm not sure.
>>
>> To run mysqld_safe as root, use the --user=root option, e.g.
>> in /etc/rc.d/init.d/mysql change the line:
>> (/opt/mysql/bin/mysqld_safe >/dev/null 2>&1 &) || error=$?
>> to
>> (/opt/mysql/bin/mysqld_safe --user=root >/dev/null 2>&1 &) ||
>> error=$? Again I'm not sure whether this is the best option, maybe add and
>> use a 'mysql' user?
>>
>
> Hi there!
>
> One more update to my previous mail: if /var/opt/mysql is owned by mysql user,
> mysql group (try 'chmod mysql:mysql -R /var/opt/mysql'), you can skip
> the --user=root option to mysqld_safe (i.e. keep the original version
> of /etc/rc.d/init.d/mysql).
>
> With best regards,
> Stefan Fiedler
>


_______________________________________________
rock-user mailing list

http://www.rocklinux.net/mailman/listinfo/rock-user