06/14
2014
MySQL 5.6 설치 (centos 6.5)
http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
[root@hostname ~]# history
1 yum localinstall mysql-community-release-el6-5.noarch.rpm
2 wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
3 yum -y install wget
4 yum -y update
5 ls
6 wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
7 yum localinstall mysql-community-release-el6-5.noarch.rpm
8 yum repolist enabled | grep "mysql.*-community.*"
9 yum install mysql-community-server
10 service mysqld start
11 mysql_secure_installation
12 history
[root@hostname ~]# service mysqld status
mysqld (pid 11378)를 실행하고 있습니다..
[root@hostname ~]#
설치는 매우 간단하다.
웹페이지에 설명이 너무 자세하게 잘 나오있다.
이건 서버 처음 설치하고 바로 실행한것임
---- 다시 세팅~
1 yum -y update
2 yum -y install wget
3 wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
4 yum localinstall mysql-community-release-el6-5.noarch.rpm
5 yum repolist enabled | grep "mysql.*-community.*"
6 yum install mysql-community-server
7 service mysqld start
8 mysql_secure_installation
9 sed -i "/--dport 3306/ d" /etc/sysconfig/iptables
10 sed -i "/lo -j ACCEPT$/ a -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT" /etc/sysconfig/iptables
11 /etc/rc.d/init.d/iptables restart
12 ifconfig
13 history
이렇게 하고보니 권한이...
[root@millky-db ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 31
Server version: 5.6.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select host, user, password from user;
+---------------+------+-------------------------------------------+
| host | user | password |
+---------------+------+-------------------------------------------+
| localhost | root | * |
| millky-db | root | * |
| 127.0.0.1 | root | * |
| ::1 | root | * |
+---------------+------+-------------------------------------------+
4 rows in set (0.00 sec)
mysql> grant all privileges on *.* to 'root'@'%' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> select host, user, password from user;
+---------------+------+-------------------------------------------+
| host | user | password |
+---------------+------+-------------------------------------------+
| localhost | root | * |
| millky-db | root | * |
| 127.0.0.1 | root | * |
| ::1 | root | * |
| % | root | * |
+---------------+------+-------------------------------------------+
5 rows in set (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@millky-db ~]# service mysqld restart
mysqld 를 정지 중: [ OK ]
mysqld (을)를 시작 중: [ OK ]
[root@millky-db ~]#