当前位置:网站首页>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
边栏推荐
- PostgreSQL reports an error when creating a trigger,
- Thinkphp3.2 information disclosure
- 4、 Fundamentals of machine learning
- Windows starts redis service
- Communication mode between processes
- asp. How to call vb DLL function in net project
- iNFTnews | 时尚品牌将以什么方式进入元宇宙?
- C# XML的应用
- Dynamics 365online applicationuser creation method change
- Difference between process and thread
猜你喜欢
![[bw16 application] Anxin can realize mqtt communication with bw16 module / development board at instruction](/img/7f/d0917366c68865222154d82b9e7b40.png)
[bw16 application] Anxin can realize mqtt communication with bw16 module / development board at instruction

What is MD5

Information Security Experiment 1: implementation of DES encryption algorithm

CSDN salary increase technology - learn about the use of several common logic controllers of JMeter

战略合作|SubQuery 成为章鱼网络浏览器的秘密武器

4、 Fundamentals of machine learning
![[4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力](/img/21/6a183e4e10daed90c66235bdbdc3bf.png)
[4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力

First issue of JS reverse tutorial

Sqlplus garbled code problem, find the solution

细说Mysql MVCC多版本控制
随机推荐
如何成为一名高级数字 IC 设计工程师(5-3)理论篇:ULP 低功耗设计技术精讲(下)
The difference between viewpager2 and viewpager and the implementation of viewpager2 in the rotation chart
信息安全实验一:DES加密算法的实现
Unity shader (to achieve a simple material effect with adjustable color attributes only)
根据热门面试题分析Android事件分发机制(一)
shake数据库中怎么使用Mongo-shake实现MongoDB的双向同步啊?
H5网页播放器EasyPlayer.js如何实现直播视频实时录像?
洛谷P2482 [SDOI2010]猪国杀
What is MD5
Esp8266 uses TF card and reads and writes data (based on Arduino)
面试被问到了解哪些开发模型?看这一篇就够了
Colorbar of using vertexehelper to customize controls (II)
Information Security Experiment 2: using x-scanner scanning tool
Difference between interface iterator and iteratable
基于智慧城市与储住分离数字家居模式垃圾处理方法
Integer or int? How to select data types for entity classes in ORM
iNFTnews | 时尚品牌将以什么方式进入元宇宙?
JMeter JDBC batch references data as input parameters (the simplest method for the whole website)
VSCode+mingw64+cmake
Detailed explanation of diffusion model