Installation notes for Mysql5.5.15 in Linux

Source: Internet
Author: User
Mysql5.5.15 uses the new cmake compilation method Setup1: Check whether cmake & mdash; cmake-I has been installed cmakewget-chttp: // Configure

Mysql 5.5.15 adopts the new cmake compiling method.
 
 
Setup 1: Check whether cmake -- cmake-I is installed.
Install cmake
Http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz wget-c
Tar-zxvf cmake-2.8.3.tar.gz
Cd cmake-2.8.3
./Bootstrap
./Configure
Make & make install
Setup 2:
Install MYSQL 5.5.8
Http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/mysql-5.5.15.tar.gz wget-c
 
Tar-zxvf mysql-5.5.15.tar.gz
 
Cd mysql-5.5.15/
Cmake-DCMAKE_INSTALL_PREFIX: PATH =/usr/local/mysql-DDEFAULT_CHARSET = utf8-DWITH_READLINE = 1-DWITH_EMBEDDED_SERVER = 1-DWITH_SSL = system-release = 1-release = 1-LH
 
Make & make install
After a long wait, the system is finished.

Groupadd mysql
Useradd-g mysql
Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my. cnf
 
Vim/etc/my. cnf # basedir and datadir must be added. otherwise, problems may occur.
[Mysqld]
Basedir =/usr/local/mysql
Datadir =/usr/local/mysql/data
 
/Usr/local/mysql/scripts/mysql_install_db-user = mysql
Chown-R mysql/usr/local/mysql/data
Chgrp-R mysql/usr/local/mysql /.
Cp/usr/local/mysql/support-files/mysql. server/etc/init. d/mysql
Chmod 755/etc/init. d/mysql
Chkconfig-level 345 mysql on
Echo "/usr/local/mysql/lib/mysql">/etc/ld. so. conf
Echo "/usr/local/lib">/etc/ld. so. conf
 
Ldconfig
/Etc/init. d/mysql start
/Usr/local/mysql/bin/mysqladmin-u root password your MYSQL password
/Etc/init. d/mysql restart
/Etc/init. d/mysql stop
 
OK is finished ~
 

FAQs:
 
1./etc/init. d/mysql: line 256: my_print_defaults: command not found
 
Solution: Check whether datadir and basedir exist in/etc/my. cnf. if not, add the datadir and basedir directory paths.
 
As follows:
[Mysqld]
Port = 3306
Basedir =/usr/local/mysql
Datadir =/usr/local/mysql/data
This entry was posted in Mysql. Bookmark the permalink.
This article is from the "Liu Shifa" blog

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.