Page 1 of 1

Mysql concern. need advice.

PostPosted: Sun May 18, 2008 7:49 pm
by jojo1031
Hi All,

I chose to install mysql on centos 5.1 using yum install and im using the release 5.0.22 since im having a hardtime installing mysql following the scartchinstall.

Does anyone here tried installing mysql the same way i did?

I also noticed that putting this "### start up the MySQL server
/usr/local/mysql/bin/mysqld_safe --user=mysql --skip-name-resolve --skip-host-cache &" to rc.local, wont start mysql automatically so i did a chkconfig --level 345 mysqld on and it started automatically on boot.

How can i add this line "--skip-name-resolve --skip-host-cache &" since im using chkconfig to start mysql on boot?

Thanks in advance :D

Regards,

Jojo

PostPosted: Mon May 19, 2008 6:16 am
by gardo
You need to put those entries in /etc/my.cnf. Should look like this:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-name-resolve
skip-host-cache

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Since you're using CentOS as your distro, you can add Mysql to the bootup scripts by issuing this as root:

checkconfig --level 345 --add mysql

mysql concern

PostPosted: Wed May 21, 2008 10:31 pm
by jojo1031
Hi Gardo,

Which of these two scripts would you prefer? Im using the last one and it seems to be ok.

checkconfig --level 345 --add mysql

or

checkconfig --level 345 mysqld on

Whats the difference between the two?

Regards,

Jojo

PostPosted: Wed May 21, 2008 10:56 pm
by gardo
You can use both. The difference is explained by entering "man chkconfig" on the command prompt. :wink:

It's "chkconfig" and not "checkconfig" by the way.

PostPosted: Sun May 25, 2008 3:08 am
by jojo1031
Got it loud and clear :D

Thanks Gardo for your time.

Regards,

Jojo