Install MySQL5.5.13GA in rpm mode on Linux

Source: Internet
Author: User
Rhel4 install mysql5.5.13 // author: guojin. chen 1, rpm installation 1, preparation package: MySQL-server-5.5.13-1.rhel4.i386.rpmMySQL-client-5.5.13-1.rhel4.i386.rpm2, check whether there is an old version of mysqlrpm-qmysql if there is

Install mysql 5.5.13 in rhel4
// Author: guojin. chen
I. rpm Installation
1. Prepare the package:
MySQL-server-5.5.13-1.rhel4.i386.rpm
MySQL-client-5.5.13-1.rhel4.i386.rpm
2. check whether there are any old mysql versions.
Rpm-q mysql
If yes, it will be detached. According to the constraints, it will be detached from the most external.
Rpm-e package
3. Installation
Rpm-ivh MySQL-server-5.5.13-1.rhel4.i386.rpm MySQL-client-5.5.13-1.rhel4.i386.rpm
4. default installation directory
/Var/lib/mysql data file directory
/Usr/share/mysql configuration file directory
/Usr/bin program directory
/Etc/rc. d/init. d/mysql Startup Script
5. Start | terminate | view the server
/Etc/rc. d/init. d/mysql start | stop | status
/Usr/bin/mysqladmin-u root-ppassword shutdown
6. Change the data file directory
Mv/var/lib/mysql/data/
Cp/usr/share/mysql/my-medium.cnf/etc/my. cnf
Vi/etc/my. cnf
Modify the socket =/data/mysql. sock of the client and mysqld groups
Vi/etc/rc. d/init. d/mysql
Modify datadir =/data/mysql
7. Start the server. If an error is reported in the log, "/usr/sbin/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13 )"
It should be related to selinux,
Solution:
Vi/etc/selinux/config
Modify selinux = disabled or permissive
Start the server again. OK.
8. If the server can be started but the client cannot be connected, the socket in the client group in my. cnf has not been changed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.