One of the significant benefits of MySQL is it’s ease of use. Generally already installed on most Linux systems, MySQL can be installed by a single command if not yet present. On Oracle Enterprise Linux 5.4 you can use the following commands to check for MySQL, configure your yum repository and install MySQL.
# Check if already installed $ rpm -qa | grep -i mysql # Configure yum repository on new server $ su - $ cd /tmp $ wget http://public-yum.oracle.com/public-yum-el5.repo $ sed -e "s/enabled=0/enabled=1/" public-yum-el5.repo > /etc/yum.repos.d/public-yum-el5.repo # Install MySQL $ yum install -y mysql-server mysql # Start and test MySQL Instance $ /etc/init.d/mysqld start $ mysql -uroot -e "SELECT VERSION" +-----------+ | VERSION() | +-----------+ | 5.0.77 | +-----------+
You can find more information about the Oracle public yum repository at http://public-yum.oracle.com You will also note that the version installed is 5.0. The current GA version of MySQL is 5.1, however Red Hat is notorious for taking time to update repositories more regularly. You can always use more current rpm files available at the MySQL downloads page.
If you want MySQL to be configured to automatically start and stop on your server you need to run the following command.
$ chkconfig mysqld on $ chkconfig --list mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
You can link to this post with the short url rb42.com/oel-install-mysql
Related Posts
- Reviewing your MySQL Installation on Oracle Enterprise Linux
- Installing a LAMP stack on Oracle Enterprise Linux
Tags: installing mysql, MySQL, Open Source, Oracle, Oracle Enterprise Linux
[...] Bradford posts a quick one on installing MYSQL on Oracle Enterprise Linux and other good advice for optimizing SQL performance using the art of [...]
[...] Bradford posts a quick one on installing MYSQL on Oracle Enterprise Linux and other good advice for optimizing SQL performance using the art of [...]
[...] Installing MySQL on Oracle Enterprise Linux [...]
[...] Installing MySQL on Oracle Enterprise Linux [...]
Being NON-technical… first: do still find your article interesting
as a contented user of MySQL to hold data would be interested in reading how to upgrade version of MySQL without loosing our database data.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 SUSE MySQL RPM