This particular sub-entry focuses on installing MySQL 5.5 on CentOS 5.7.
For reference, CentOS ships with MySQL 5.0.77 by default, at the time of this entry (January 2012). This entry does not involve any migration and assumes a new server is being deployed. Nonstandard repos are required (remi and EPEL)
0. Login as root
1. Remove previously installed MySQL (if applicable)
yum erase mysql
2. Install additional repos
Navigate to temporary directory
cd /tempInstall EPEL repo
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
UPDATE 11 MAY 2012: The above URL is sporadic. Please use this alternative if the original does not work. - http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5-4.noarch.rpm
Install remi repo
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm
3. Ensure the repo contains MySQL 5.5
yum --enablerepo=remi list mysql mysql-server
4. Install MySQL 5.5
yum install --enablerepo=remi mysql*
5. Start MySQL and configure to start on boot
service mysqld start
chkconfig mysqld on
6. Run mysql upgrade script
mysql_upgrade -u root -p
7. Change Mysql default Password
/usr/bin/mysqladmin -u root password 'yourpasswordhere'
8. Check to ensure mysql 5.5 is installed.
mysql --version
That's it! MySQL 5.5 should now be installed. Dont forget to tune your server:
http://noveckg.blogspot.com/2011/04/some-mysql-database-tuning-from-non-dba.html
-noveck
error with
ReplyDeletewget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
OK with
wget http://download.fedoraproject.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Both are not working now..!
ReplyDeleteThat's strange, it seems to be related to the site URL that changed.
ReplyDeleteThis works: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
I'll update the original post. Thanks
now it is: http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
ReplyDeleterpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
ReplyDeleteThank you for this blog.
ReplyDeleteIt's very helpful for me!!
It's working well!!
Thanks again~!
You are a saint.
ReplyDeleteI have been bashing my head against the wall trying to get anything newer than 5.1 installed and I couldn't find a repo that had it. (linux is not a strongsuit).
I'm running CentOS 6 (did oracle linux first) both using el6 so I just changed a few things in your doc to match - and bingo - 5.5.33.
Thank you so much.
If i want to install a specific version, say 5.5.21, how can I do that ?
ReplyDeleteThanks for sharing this post with us. This is really useful. Keep doing more.
ReplyDeleteSpoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
IELTS Training in Chennai
IELTS Chennai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
IELTS Mumbai
IELTS Center in Mumbai
IELTS Coaching in T Nagar