XK8ER
asked on
starting mysql service
hello there,
my centos v5.6 server came already with mysql service installed but it was installed by rpm and its version 5.1.58.
I have downloaded the latest source code which is 5.5.16 and installed this version located in /opt
now I have stopped mysql and started the new version like this
/opt/mysql5516/etc/mysql.s erver start
but if I stop and start the service like this (service mysql start) then the old one starts
how can I update this information and also this one.
[(05:22 PM)][(root@alpha)] [(/opt)] $ chkconfig --list mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
so the right mysql start after reboot..
my centos v5.6 server came already with mysql service installed but it was installed by rpm and its version 5.1.58.
I have downloaded the latest source code which is 5.5.16 and installed this version located in /opt
now I have stopped mysql and started the new version like this
/opt/mysql5516/etc/mysql.s
but if I stop and start the service like this (service mysql start) then the old one starts
how can I update this information and also this one.
[(05:22 PM)][(root@alpha)] [(/opt)] $ chkconfig --list mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
so the right mysql start after reboot..
If you aren't going to use the old version, uninstall it.
Then if you want your version of mysql to be managed by chkconfig, check out the manpage for what is required (start/kill for each runlevel for example) and write a script to start your new version. You should be able to accomplish that by referencing start up scripts that are currently managed by chkconfig.
yum erase mysql-server
orrpm -e mysql-server
Then if you want your version of mysql to be managed by chkconfig, check out the manpage for what is required (start/kill for each runlevel for example) and write a script to start your new version. You should be able to accomplish that by referencing start up scripts that are currently managed by chkconfig.
ASKER
any way I can setup the new service like
"service mysqld start" for the new mysql and
"service mysql start" for the old one?
"service mysqld start" for the new mysql and
"service mysql start" for the old one?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
okay, this is what I did.. is this right?
-(01:45 58 PM)-(root@alpha)-(/etc/ini t.d) $ service mysql stop
Shutting down MySQL....
cp /opt/mysql5516/etc/mysql.s erver /etc/init.d/mysqld
-(01:46 20 PM)-(root@alpha)-(/etc/ini t.d) $ service mysqld start
Starting MySQL...
-(01:48 32 PM)-(root@alpha)-(/etc/ini t.d) $ chkconfig mysql off
-(01:48 02 PM)-(root@alpha)-(/etc/ini t.d) $ chkconfig --list mysqld
service mysqld supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add mysqld')
-(01:48 03 PM)-(root@alpha)-(/etc/ini t.d) $ chkconfig --add mysqld
-(01:48 19 PM)-(root@alpha)-(/etc/ini t.d) $ chkconfig mysqld on
-(01:48 36 PM)-(root@alpha)-(/etc/ini t.d) $ chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
-(01:45 58 PM)-(root@alpha)-(/etc/ini
Shutting down MySQL....
cp /opt/mysql5516/etc/mysql.s
-(01:46 20 PM)-(root@alpha)-(/etc/ini
Starting MySQL...
-(01:48 32 PM)-(root@alpha)-(/etc/ini
-(01:48 02 PM)-(root@alpha)-(/etc/ini
service mysqld supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add mysqld')
-(01:48 03 PM)-(root@alpha)-(/etc/ini
-(01:48 19 PM)-(root@alpha)-(/etc/ini
-(01:48 36 PM)-(root@alpha)-(/etc/ini
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Without knowing the contents of your new init script, I can't tell for sure, but all the commands look correct.
When you run 'service mysqld start' does it start the proper version now?
When you run 'service mysqld start' does it start the proper version now?
http://articles.slicehost.com/2011/3/10/configuring-mysql-server-on-centos