Click to See Complete Forum and Search --> : mysql


Reko
01-31-2002, 10:32 AM
I installed mysql 3.23.47.tar.gz thing is it did not install as a service as the rpm whould have. i have to type /usr/local/mysql/bin/./mysql -u etc. to start the thing. Is there a way to turn it into a service so it starts on boot, or somehow use chkconfig --add to get it. Thanks.

Bryan

bdl
01-31-2002, 11:12 AM
Check the README. There's a script in one of the folders (support/mysql.server I think) that is pretty much all ready to go and drop into your init structure.

bigrigdriver
01-31-2002, 07:57 PM
Mysql.server is used to start and stop the daemon manually. If you want the server to start automagically on boot, edit your rc.local file, adding this to the end: /bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysyld --user=mysql &'.
The command should all be on one line.
(Source: MySQL Reference Manual)
You could also edit your .bashrc and create an alias command. Choose a short name for it, and set alias <shortname>=<the full command>.

[ 31 January 2002: Message edited by: bigrigdriver ]

bdl
01-31-2002, 08:32 PM
My mistake, it's support-files/mysql.server


$ head /usr/local/mysql/support-files/mysql.server


Usually this is put in /etc/init.d (at least on machines SYSV R4 based systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/S01mysql.
When this is done the mysql server will be started when the machine is started and shut down when the systems goes down.

Reko
02-01-2002, 10:15 AM
Ok, I installed the binaries and I got mysql up and running and to start and stop automatically on boot/shutdown.

NOW, i am getting this error when I try and change the root password via this command from the mysql directory:
bin/mysqladmin -u root -p password 'mypass'
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

I did a useradd mysql. and i did:
cd /usr/local/mysql/data
chown -R mysql:mysql .
chmod -R go-rwx .

I thought that would be sufficient for permission sakes. Can anyone give me pointers? I'm using it with no password now and it works fine. Thanks.

-Bryan