{"id":6942,"date":"2017-09-02T00:14:42","date_gmt":"2017-09-01T16:14:42","guid":{"rendered":"http:\/\/rmohan.com\/?p=6942"},"modified":"2017-09-02T00:14:42","modified_gmt":"2017-09-01T16:14:42","slug":"centos-7-mysql-5-7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6942","title":{"rendered":"CENTOS 7 MySQL 5.7"},"content":{"rendered":"<p>CENTOS 7 MySQL 5.7<\/p>\n<p>&nbsp;<\/p>\n<p>wget http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-7.noarch.rpm<\/p>\n<p>yum install -y mysql-community-server<\/p>\n<p>&nbsp;<\/p>\n<p>systemctl start mysqld.service<\/p>\n<p>[root@clusterserver1 software]# systemctl start mysqld.service<br \/>\n[root@clusterserver1 software]# mysql -uroot -p<br \/>\nEnter password:<br \/>\nWelcome to the MySQL monitor. Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 3<br \/>\nServer version: 5.7.19 MySQL Community Server (GPL)<\/p>\n<p>Copyright (c) 2000, 2017, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<br \/>\naffiliates. Other names may be trademarks of their respective<br \/>\nowners.<\/p>\n<p>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/p>\n<p>mysql&gt;update mysql.user set authentication_string=password(&#8220;test123&#8243;) where user=&#8221;root&#8221; and Host=&#8221;localhost&#8221;;<br \/>\nmysql&gt;flush privileges;<br \/>\nmysql&gt;quit;<\/p>\n<p>systemctl restart mysqld;<\/p>\n<p>&nbsp;<\/p>\n<p>vi \/etc\/my.cnf<\/p>\n<p>&nbsp;<\/p>\n<p>[mysqld]<\/p>\n<p>skip-grant-tables<\/p>\n<p>skip-networking<\/p>\n<p>&nbsp;<\/p>\n<p>[root@clusterserver1 software]# mysql -u root -p<br \/>\nEnter password:<br \/>\nWelcome to the MySQL monitor. Commands end with ; or \\g.<br \/>\nYour MySQL connection id is 4<br \/>\nServer version: 5.7.19 MySQL Community Server (GPL)<\/p>\n<p>Copyright (c) 2000, 2017, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>Oracle is a registered trademark of Oracle Corporation and\/or its<br \/>\naffiliates. Other names may be trademarks of their respective<br \/>\nowners.<\/p>\n<p>Type &#8216;help;&#8217; or &#8216;\\h&#8217; for help. Type &#8216;\\c&#8217; to clear the current input statement.<\/p>\n<p>mysql&gt; use mysql;<br \/>\nReading table information for completion of table and column names<br \/>\nYou can turn off this feature to get a quicker startup with -A<\/p>\n<p>Database changed<br \/>\nmysql&gt; GRANT ALL PRIVILEGES ON *.* TO &#8216;root&#8217;@&#8217;%&#8217; IDENTIFIED BY &#8216;test123&#8217; WITH GRANT OPTION;<br \/>\nmysql&gt; select host, user from user;<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+<br \/>\n| host | user |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+<br \/>\n| 127.0.0.1 | root |<br \/>\n| ::1 | root |<br \/>\n| clusterserver1.rmohan.com | |<br \/>\n| clusterserver1.rmohan.com | root |<br \/>\n| localhost | |<br \/>\n| localhost | root |<br \/>\n+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+<br \/>\n6 rows in set (0.00 sec)<\/p>\n<p>&nbsp;<\/p>\n<p>vi \/etc\/sysconfig\/iptables<\/p>\n<p>-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 3306 -j ACCEPT<\/p>\n<p>&nbsp;<\/p>\n<p>vi \/etc\/my.cnf<\/p>\n<p>&nbsp;<\/p>\n<p>[mysqld]<\/p>\n<p>character-set-server=utf8<\/p>\n<p>collation-server=utf8_general_ci<\/p>\n<p>&nbsp;<\/p>\n<p>mysql&gt; status;<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nmysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper<\/p>\n<p>Connection id: 5<br \/>\nCurrent database:<br \/>\nCurrent user: root@localhost<br \/>\nSSL: Not in use<br \/>\nCurrent pager: stdout<br \/>\nUsing outfile: &#8221;<br \/>\nUsing delimiter: ;<br \/>\nServer version: 5.7.19 MySQL Community Server (GPL)<br \/>\nProtocol version: 10<br \/>\nConnection: Localhost via UNIX socket<br \/>\nServer characterset: latin1<br \/>\nDb characterset: latin1<br \/>\nClient characterset: utf8<br \/>\nConn. characterset: utf8<br \/>\nUNIX socket: \/var\/lib\/mysql\/mysql.sock<br \/>\nUptime: 3 min 28 sec<\/p>\n<p>Threads: 1 Questions: 44 Slow queries: 0 Opens: 56 Flush tables: 1 Open tables: 49 Queries per second avg: 0.211<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CENTOS 7 MySQL 5.7<\/p>\n<p>&nbsp;<\/p>\n<p>wget http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-7.noarch.rpm<\/p>\n<p>yum install -y mysql-community-server<\/p>\n<p>&nbsp;<\/p>\n<p>systemctl start mysqld.service<\/p>\n<p>[root@clusterserver1 software]# systemctl start mysqld.service [root@clusterserver1 software]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \\g. Your MySQL connection id is 3 Server version: 5.7.19 MySQL Community Server (GPL)<\/p>\n<p>Copyright (c) 2000, 2017, [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6942"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6942"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6942\/revisions"}],"predecessor-version":[{"id":6943,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6942\/revisions\/6943"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}