RedHat6.3 MySQL-server-5.6.13-1.el6.x86_64.rpm Installation

Source: Internet
Author: User
Install MySQL-server-5.6.13-1.el6.x86_64.rpm under RedHat6.3

Install MySQL-server-5.6.13-1.el6.x86_64.rpm under RedHat 6.3

Install MySQL-server-5.6.13-1.el6.x86_64.rpm under RedHat 6.3

First, download the following three files:

MySQL-client-5.6.13-1.el6.x86_64.rpm
MySQL-devel-5.6.13-1.el6.x86_64.rpm
MySQL-server-5.6.13-1.el6.x86_64.rpm

Then use the root account to log in and install it:

1. Install server, devel, and client: 1. Install server, devel, and client:

Rpm-ivh -- replacefiles MySQL-s *. rpm

Rpm-ivh -- replacefiles MySQL-d *. rpm

Rpm-ivh -- replacefiles MySQL-c *. rpm

[Root @ localhost download] # rpm-ivh -- replacefiles MySQL-server-5.6.13-1.el6.x86_64.rpm
Preparing... ######################################## ### [100%]
1: mySQL-server ##################################### ###### [100%]
[Root @ localhost download] # rpm-ivh -- replacefiles MySQL-client-5.6.13-1.el6.x86_64.rpm
Preparing... ######################################## ### [100%]
1: mySQL-client ##################################### ###### [100%]
[Root @ localhost download] # rpm-ivh -- replacefiles MySQL-devel-5.6.13-1.el6.x86_64.rpm
Preparing... ######################################## ### [100%]
1: mySQL-devel ##################################### ###### [100%]

To remove and install, you can use rpm-e MySQL-server, rpm-e MySQL-devel, and MySQL-client;

2. initialize the database:

/Usr/bin/mysql_install_db

3. Start the mysql service:

Service mysql start

Run the command ps-ef | grep mysql to view the mysql process:

[Root @ localhost ~] # Ps-ef | grep mysql
Root 26047 1 0 00:00:00 pts/12/bin/sh/usr/bin/mysqld_safe -- datadir =/var/lib/mysql -- pid-file =/var/lib/mysql/ localhost. localdomain. pid
Mysql 26227 26047 0 00:00:01 pts/12/usr/sbin/mysqld -- basedir =/usr -- datadir =/var/lib/mysql -- plugin-dir =/usr/lib64/mysql /plugin -- user = mysql -- log-error =/var/log/mysqld. log -- pid-file =/var/lib/mysql/localhost. localdomain. pid -- socket =/var/lib/mysql. sock
Root 26545 24726 0 00:00:00 pts/8 grep mysql

4. Set the root password for the first login:

First check cat/root/. mysql_secret

Root @ localhost ~] # Cat/root/. mysql_secret
# The random password set for the root user at Fri Aug 30 15:57:18 2013 (local time): fMYcarvB

Then run mysql-u root-p and enter the above password:

[Root @ localhost ~] # Mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 5
Server version: 5.6.13 MySQL Community Server (GPL)

Copyright (c) 2000,201 3, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Set the root password:

Mysql> use mysql
Database changed
Mysql> update user set password = password ('root') where user = 'root ';
Query OK, 0 rows affected (0.15 sec)
Rows matched: 5 Changed: 0 Warnings: 0

Mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Log out and log on again to use the new password;

5. Set remote login:

After logging on to mysql using root

Mysql> update user set host = '%' where user = 'root ';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'Primary'
Mysql> select host, user from user;
+ ----------------------- + ------ +
| Host | user |
+ ----------------------- + ------ +
| % | Root |
| 127.0.0.1 | root |
| 192.168.128.142 | root |
|: 1 | root |
| Localhost. localdomain | root |
+ ----------------------- + ------ +
5 rows in set (0.00 sec)

Then:

Mysql> grant all privileges on *. * to 'root' @ '%' with grant option;
Query OK, 0 rows affected (0.08 sec)

Mysql> exit
Bye
[Root @ localhost ~] # Service mysql restart
Shutting down MySQL... SUCCESS!
Starting MySQL... SUCCESS!
Restart mysql to log on remotely.

,

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.