Yum install MySQL Database

Source: Internet
Author: User
Tags install php

1) Operating system environment: CentOS6.6

2) Task: source installation MySQL

   question: source configuration failed, do not know the problem is the package or the system is missing library files? Unable to compile, through

4) Workaround: To solve the problem, Install the successful MYSQL database by using Yum .

5) The installation process is as follows:

[[email protected] tools] #yum –y Install Mysql-server

[[email protected] tools] #yum-y install Php-mysql

[Email protected] tools]# chkconfig mysqld on

[[Email protected] tools]# service Mysqldstart

[[email protected] tools]# mysqladmin-u Rootpassword Sky// Cannot change password

Mysqladmin:connect to server at ' localhost ' failed

Error: ' Access denied for user ' root ' @ ' localhost ' (using Password:no) '

[[Email protected] tools]# service mysqld stop

[Email protected] tools]# Mysqld_safe--skip-grant-tables &

[[email protected] tools] #update user Setpassword=password ("Sky") where user= "root";

[Email protected] tools]# Mysql–u root–p

Msql>

Mysql>use MySQL

mysql> Update user set Password=password ("Sky") whereuser= "root";

Query OK, 0 rows Affected (0.00 sec)

Rows Matched:3 changed:0 warnings:0

mysql> flush Privileges; Update Permissions

Query OK, 0 rows Affected (0.00 sec)

// so far, you've set a new password, and you can log in to it properly with your new password . MySQL data.

Note: Since it is installed through Yum , usually we want to configure and optimize the database, which should be clear where the configuration files are stored, so it is important to know how to install the source code, the following is the installation of the common default directory through the Yum Source:

database directory:/var/lib/mysql/

configuration file :/usr/share/mysql

related commands :/usr/bin [ e.g. MySQL,mysqladmin,mysqldump,mysqlshow, etc. ]

startup script:/etc/rc.d/init.d/


This article is from the "Operations" blog, please be sure to keep this source http://sky9896.blog.51cto.com/2330653/1591391

Yum install MySQL Database

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.