{"id":6869,"date":"2017-07-21T15:41:54","date_gmt":"2017-07-21T07:41:54","guid":{"rendered":"http:\/\/rmohan.com\/?p=6869"},"modified":"2017-07-21T15:41:54","modified_gmt":"2017-07-21T07:41:54","slug":"centos-7-rpm-installed-under-the-mysql-5-6-36","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6869","title":{"rendered":"CentOS 7 rpm installed under the MySQL 5.6.36"},"content":{"rendered":"<p><a title=\"CentOS\" href=\"http:\/\/www.linuxidc.com\/topicnews.aspx?tid=14\" target=\"_blank\" rel=\"noopener\">CentOS<\/a>\u00a07 under the local installation of MySQL 5.7, but the springboot integration jpa will appear hibernateException, do not know why, for a MySQL5.6 version of MySQL, source installation, cmake has been through, and later into rpm installation.<\/p>\n<p>Local installation of mysql5.7, but the integration of springboot jpa will appear hibernateException, do not know why, for a mysql5.6 version of the mysql, source installation, cmake has been through, and later changed to rpm installation<\/p>\n<p>1, get mysql5.6<\/p>\n<div class=\"linuxidc_code\">\n<pre>Ftp:\/\/ftp.mirrorservice.org\/sites\/ftp.mysql.com\/Downloads\/MySQL-5.6\/<\/pre>\n<p>download:\u00a0<img decoding=\"async\" src=\"http:\/\/www.linuxidc.com\/upload\/2017_07\/170718071260371.png\" alt=\"\" \/><\/p>\n<p>Where el6 identifies centos 6, el7 identifies centos 7<\/p>\n<p>2, installation<\/p>\n<div class=\"linuxidc_code\">\n<pre>Rpm -ivh MySQL- *<\/pre>\n<\/div>\n<p>3, start<\/p>\n<div class=\"linuxidc_code\">\n<pre>Systemctl start mysql<\/pre>\n<\/div>\n<p>4, view the initial password<\/p>\n<div class=\"linuxidc_code\">\n<pre>Cat \/root\/.mysql_secret<\/pre>\n<\/div>\n<p>5, change the password<\/p>\n<div class=\"linuxidc_code\">\n<pre>Mysql -uroot -pKAKt5JmEjm6B8omV\r\n<code class=\"plain\">SET PASSWORD = PASSWORD(<\/code><code class=\"string\">'root'<\/code><code class=\"plain\">);<\/code><\/pre>\n<\/div>\n<p>6, remote login settings<\/p>\n<div class=\"linuxidc_code\">\n<pre>Mysql&gt; user mysql;\r\nMysql &gt; select host, user, password from user;\r\nMysql &gt; update user set password = password ( ' root ' ) where user = ' root ' ;\r\nMySQL &gt; Update the User the SET Host = ' % '  the WHERE the User = ' root ' and Host = ' localhost ' ; \r\n\r\nauthorized \r\n<span class=\"keyword\">GRANT\u00a0 <span class=\"op\">ALL\u00a0 PRIVILEGES\u00a0 . ON * *\u00a0 the TO\u00a0 <span class=\"string\">'root' @ '%' IDENTIFIED\u00a0 BY\u00a0 'Here is your password'\u00a0 the WITH\u00a0 GRANT<\/span><\/span><\/span><\/pre>\n<\/div>\n<p>7, set the boot start<\/p>\n<div class=\"linuxidc_code\">\n<pre>[Root @ localhost ~ ] # chkconfig mysql on\r\n[Root @ localhost ~] # chkconfig --list | grep mysql<\/pre>\n<\/div>\n<p>8, MySQL default installation location<\/p>\n<div class=\"linuxidc_code\">\n<pre>\/ Var \/ lib \/ mysql \/                # database directory\r\n \/ usr \/ share \/ mysql # configuration file directory\r\n \/ usr \/ bin # related command directory\r\n \/etc\/init.d\/mysql # start script<\/pre>\n<\/div>\n<p>9, modify the default character set and so on<\/p>\n<p>Vim \/etc\/my.cnf<\/p>\n<div class=\"linuxidc_Highlighter sh-gutter\">\n<div id=\"highlighter_385249\" class=\"syntaxhighlighter  csharp ie\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"csharp plain\">[client]\u00a0<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"csharp plain\">password\u00a0 \u00a0 \u00a0 \u00a0 = root<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"csharp plain\">port\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = 3306\u00a0<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"csharp keyword\">default<\/code><code class=\"csharp plain\">-character-<\/code><code class=\"csharp keyword\">set<\/code><code class=\"csharp plain\">=utf8\u00a0<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"csharp plain\">[mysqld]\u00a0<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"csharp plain\">port\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 = 3306\u00a0<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"csharp plain\">character_set_server=utf8\u00a0<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"csharp plain\">character_set_client=utf8\u00a0<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"csharp plain\">collation-server=utf8_general_ci\u00a0<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"csharp plain\">lower_case_table_names=1\u00a0<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"csharp plain\">max_connections=1000\u00a0<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"csharp plain\">[mysql]\u00a0<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"csharp keyword\">default<\/code><code class=\"csharp plain\">-character-<\/code><code class=\"csharp keyword\">set<\/code>\u00a0<code class=\"csharp plain\">= utf8\u00a0<\/code><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>10, view the character set<\/p>\n<div class=\"linuxidc_code\">\n<pre>Show variables like ' % collation% ' ;  \r\nShow variables like ' % char% ' ;<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 under the local installation of MySQL 5.7, but the springboot integration jpa will appear hibernateException, do not know why, for a MySQL5.6 version of MySQL, source installation, cmake has been through, and later into rpm installation.<\/p>\n<p>Local installation of mysql5.7, but the integration of springboot jpa will appear hibernateException, do not know why, [&#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\/6869"}],"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=6869"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6869\/revisions"}],"predecessor-version":[{"id":6870,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6869\/revisions\/6870"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}