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.
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
1, get mysql5.6
Ftp://ftp.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.6/
download:
Where el6 identifies centos 6, el7 identifies centos 7
2, installation
Rpm -ivh MySQL- *
3, start
Systemctl start mysql
4, view the initial password
Cat /root/.mysql_secret
5, change the password
Mysql -uroot -pKAKt5JmEjm6B8omVSET PASSWORD = PASSWORD(
'root'
);
6, remote login settings
Mysql> user mysql;
Mysql > select host, user, password from user;
Mysql > update user set password = password ( ' root ' ) where user = ' root ' ;
MySQL > Update the User the SET Host = ' % ' the WHERE the User = ' root ' and Host = ' localhost ' ;
authorized
GRANT ALL PRIVILEGES . ON * * the TO 'root' @ '%' IDENTIFIED BY 'Here is your password' the WITH GRANT
7, set the boot start
[Root @ localhost ~ ] # chkconfig mysql on [Root @ localhost ~] # chkconfig --list | grep mysql
8, MySQL default installation location
/ Var / lib / mysql / # database directory / usr / share / mysql # configuration file directory / usr / bin # related command directory /etc/init.d/mysql # start script
9, modify the default character set and so on
Vim /etc/my.cnf
[client]
password = root
port = 3306
default
-character-
set
=utf8
[mysqld]
port = 3306
character_set_server=utf8
character_set_client=utf8
collation-server=utf8_general_ci
lower_case_table_names=1
max_connections=1000
[mysql]
default
-character-
set
= utf8
10, view the character set
Show variables like ' % collation% ' ; Show variables like ' % char% ' ;
Recent Comments