Solved

starting mysql service

Posted on 2011-09-19
6
301 Views
Last Modified: 2013-12-16
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.server 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..
0
Comment
Question by:XK8ER
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:Randy Downs
ID: 36563594
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36563633
If you aren't going to use the old version, uninstall it.
yum erase mysql-server

Open in new window

or
rpm -e mysql-server

Open in new window


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.
0
 
LVL 1

Author Comment

by:XK8ER
ID: 36563652
any way I can setup the new service like
"service mysqld start" for the new mysql and
"service mysql start" for the old one?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36563665
That's basically the same thing.



service(8)                                                          service(8)

NAME
       service - run a System V init script

SYNOPSIS
       service SCRIPT COMMAND [OPTIONS]

       service --status-all

       service --help | -h | --version

DESCRIPTION
       service  runs  a  System V init script in as predictable environment as possible, removing most environment vari-
       ables and with current working directory set to /.

       The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT.  The  supported  values  of
       COMMAND  depend  on the invoked script, service passes COMMAND and OPTIONS it to the init script unmodified.  All
       scripts should support at least the start and stop commands.  As a special case, if  COMMAND  is  --full-restart,
       the script is run twice, first with the stop command, then with the start command.

       service --status-all runs all init scripts, in alphabetical order, with the status command.

FILES
       /etc/init.d
              The directory containing System V init scripts.
0
 
LVL 1

Author Comment

by:XK8ER
ID: 36563706
okay, this is what I did.. is this right?

-(01:45 58 PM)-(root@alpha)-(/etc/init.d) $ service mysql stop
Shutting down MySQL....  

cp /opt/mysql5516/etc/mysql.server /etc/init.d/mysqld

-(01:46 20 PM)-(root@alpha)-(/etc/init.d) $ service mysqld start
Starting MySQL...  

-(01:48 32 PM)-(root@alpha)-(/etc/init.d) $ chkconfig mysql off
-(01:48 02 PM)-(root@alpha)-(/etc/init.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/init.d) $ chkconfig --add mysqld
-(01:48 19 PM)-(root@alpha)-(/etc/init.d) $ chkconfig mysqld on
-(01:48 36 PM)-(root@alpha)-(/etc/init.d) $ chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36563723
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?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
People Counting Software 2 62
Parse DNS log 3 36
Block sender e-mail address in Postfix 4 41
BASH script to modify crontab? 3 23
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now