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