当前位置:网站首页>CentOS installs JDK1.8 and mysql5 and 8 (the same command 58 in the second installation mode is common, opening access rights and changing passwords)
CentOS installs JDK1.8 and mysql5 and 8 (the same command 58 in the second installation mode is common, opening access rights and changing passwords)
2022-07-07 09:45:00 【qq_ thirty-six million nine hundred and sixty-seven thousand an】
jdk And mysql Both contain tar Package and yum Two installation methods
The first one is jdk
Download good tar package
tar zxvf jdk-8u181-linux-x64.tar.gz /usr/local/java
Configure environment variables
vim /etc/profile
Add at the bottom
export JAVA_HOME=/usr/local/java/jdk1.8.0_181
export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:PATH
wq preservation
Input java -version、javac、 java Come and check 8481bc1aa61953d.png)
Whether the certificate is installed
The second kind jdk use yum install
yum -y remove java*
After uninstalling, restart
yum -y install java-1.8.0-openjdk-devel.x86_64
mysql Installation mode
The first one is mysql use yum install
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
Download dependent installation services ,8 As the corresponding 8 Of rpm that will do
start-up :systemctl start mysqld.service
View service :systemctl status mysqld.service
Check the password :grep “password” /var/log/mysqld.log
The last is mysql The opening of password and access rights is put in tar Package installed together
The second kind mysqltar Package installation method
tar -zxvf /root/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz -C
/usr/local/
mv mysql-5.7.30-linux-glibc2.12-x86_64 mysql
groupadd mysql
useradd -g mysql mysql
mkdir /usr/local/mysql/data
chown -R mysql:mysql ./
vim /etc/my.cnf
[mysql]
Set up mysql Client default character set
default-character-set=utf8
socket=/var/lib/mysql/mysql.sock
[mysqld]
skip-name-resolve
# Set up 3306 End ⼝
port = 3306
socket=/var/lib/mysql/mysql.sock
Set up mysql Installation ⽬ record
basedir=/usr/local/mysql
Set up mysql The storage of data in the database ⽬ record
datadir=/usr/local/mysql/data
Allow the most ⼤ The number of connections
max_connections=200
The server makes ⽤ The default character set is 8⽐ Special coded latin1 Character set
character-set-server=utf8
Creating a new table will make ⽤ The default storage engine for
default-storage-engine=INNODB
lower_case_table_names=1
max_allowed_packet=16M
mkdir /var/lib/mysql
chmod 777 /var/lib/mysql
cd /usr/local/mysql
./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql –
datadir=/usr/local/mysql/data
cp ./support-files/mysql.server /etc/init.d/mysqld
vim /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --list mysqld
service mysqld start
vim ~/.bash_profile
export PATH=$PATH:/usr/local/mysql/bin
source ~/.bash_profile
mysql -u root -p
alter user user() identified by “root”;
flush privileges;
use mysql;
update user set user.Host=’%’ where user.User=‘root’;
flush privileges;
All installed , The second kind mysql The installation method is applicable to 5 And 8 Fine , Just copy it , Copy in large sections
Every time you install this
边栏推荐
- Colorbar of using vertexehelper to customize controls (II)
- Difference between process and thread
- flex弹性布局
- Sqlplus garbled code problem, find the solution
- How does mongodb realize the creation and deletion of databases, the creation of deletion tables, and the addition, deletion, modification and query of data
- MongoDB怎么实现创建删除数据库、创建删除表、数据增删改查
- Addition, deletion, modification and query of ThinkPHP database
- [4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力
- 创建一个长度为6的int型数组,要求数组元素的值都在1-30之间,且是随机赋值。同时,要求元素的值各不相同。
- 大佬们,有没有遇到过flink cdc读MySQLbinlog丢数据的情况,每次任务重启就有概率丢数
猜你喜欢
How does mongodb realize the creation and deletion of databases, the creation of deletion tables, and the addition, deletion, modification and query of data
csdn涨薪技术-浅学Jmeter的几个常用的逻辑控制器使用
esp8266使用TF卡并读写数据(基于arduino)
Information Security Experiment 3: the use of PGP email encryption software
Unity shader (basic concept)
Information Security Experiment 1: implementation of DES encryption algorithm
Information Security Experiment 4: implementation of IP packet monitoring program
Information Security Experiment 2: using x-scanner scanning tool
Integer or int? How to select data types for entity classes in ORM
Diffusion模型详解
随机推荐
数据库多表关联查询问题
Write VBA in Excel, connect to Oracle and query the contents in the database
Vs2013 generate solutions super slow solutions
# Arthas 简单使用说明
asp. How to call vb DLL function in net project
Unity uses mesh to realize real-time point cloud (II)
根据热门面试题分析Android事件分发机制(一)
Thinkphp3.2 information disclosure
sqlplus乱码问题,求解答
[4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力
Upload taro pictures to Base64
战略合作|SubQuery 成为章鱼网络浏览器的秘密武器
js逆向教程第二发-猿人学第一题
第一讲:包含min函数的栈
MongoDB怎么实现创建删除数据库、创建删除表、数据增删改查
Communication mode between processes
基础篇:带你从头到尾玩转注解
How to become a senior digital IC Design Engineer (5-3) theory: ULP low power design technology (Part 2)
Kubernetes cluster capacity expansion to add node nodes
Unity shader (pass user data to shader)