Centos 5.5 compilation and installation of mysql5.5

Source: Internet
Author: User

Environment:

[Root @ Linux ~] # Lsb_release-

LSB version: core-3.1-ia32: core-3.1-noarch: graphics-3.1-ia32: graphics-3.1-noarch
Distributor ID: centos
Description: centos release 5.5 (final)
Release: 5.5
Codename: Final

 

1. Download and install cmark
: Http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
# Cd cmake-version
#./Configure
# Make
# Make install

2. Download and install MySQL
: Http://www.mysql.com/downloads/mysql/
# Groupadd MySQL
# Useradd-r-g MySQL
# Tar zxvf mysql-VERSION.tar.gz
# Cd mysql-version
# Cmake.
# Make
# Make install
# Cd/usr/local/MySQL
# Chown-r MySQL.
# Chgrp-r MySQL.
# Scripts/mysql_install_db -- user = MySQL
# Chown-r root.
# Chgrp-r Mysql Data
# Cp support-files/my-medium.cnf/etc/My. CNF
# Bin/mysqld_safe -- user = MySQL &
# Cp support-files/MySQL. Server/etc/init. d/MySQL. Server

After the installation is complete, you may log on to the root user without setting a password. Therefore, you must set a password.
#/Etc/init. d/MySQL stop
# Mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# Mysql-u root MySQL

Mysql> Update user SET Password = PASSWORD ('newpassword') where user = 'root ';
Mysql> flush privileges;
Mysql> quit

#/Etc/init. d/MySQL restart
# Mysql-uroot-P
Enter Password: <enter the new password newpassword>
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| MySQL |
| Performance_schema |
| Test |
+ -------------------- +
4 rows in SET (0.00 Sec)

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.