Install mysql5.5 in linux source code

Source: Internet
Author: User
Install mysql5.5 in linux source code-Linux general technology-Linux technology and application information. For more information, see the following section. Install mysql 5.5 with source code

In fact, there is nothing special about installation, mainly because the script storage path and file name may be slightly different between different versions.

Cmake is required to install mysql in source code.
After downloading and installing cmake, run the following command in the mysql extract Directory:
$ Mkdir build
$ Cd build
$ Cmake ..
$ Make & make install

Create a mysql User and modify the mysql installation path. the installation path is/usr/local.
# Useradd-M-s/sbin/nologin mysql
# Chown-R root: mysql/usr/local/mysql
# Chown-R mysql/usr/local/mysql/var

Copy the configuration file
/Usr/local/mysql # cp support-files/my-medium.cnf/etc/my. cnf
/Usr/local/mysql # cp support-files/mysql. server/etc/init. d/mysqld
If mysqld does not have the executable permission, grant it the executable permission chmod + x/etc/init. d/mysqld

Execute the mysql initialization script
/Usr/local/mysql # sh scripts/mysql_install-db -- user = mysql
You can view -- help to obtain more options, such as data storage paths.

The initial root password is blank. to set the root password, log on as root first.
$ Mysql-uroot-p
Enter password :( press Enter directly)
Mysql> set password for root = PASSWORD ('20140901 ');

If you encounter "Starting MySQL .. The server quit without updating PID
File ", do you forget to initialize the database?

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.