`
munandong
  • 浏览: 9174 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

linux config

 
阅读更多

yum update -y

yum install wget -y

 

yum list mysql*

yum install mysql-server* -y

 

yum list java*

yum install java-1.8.0-openjdk* -y

java -version

 

cd /usr/local

wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

yum install mysql-community-server -y

service mysqld restart

mysql -uroot

set password for 'root'@'localhost' = password('Zaq12wsx');

 

cd /usr/local

wget http://apache.fayea.com/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz

tar -zxvf  apache-tomcat-8.0.24.tar.gz

mv apache-tomcat-8.0.24 tomcat

 

chmod -R 777 tomcat/

 

1、在[client]字段里加入default-character-set=utf8,如下:

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set=utf8

2、在[mysqld]字段里加入character-set-server=utf8,如下:

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
character-set-server=utf8

3、在[mysql]字段里加入default-character-set=utf8,如下:

[mysql]
no-auto-rehash
default-character-set=utf8

修改完成后,service mysql restart重启mysql服务就生效。注意:[mysqld]字段与[mysql]字段是有区别的。这点在网上没人反馈过。

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics