当前位置:网站首页>Mysql database installation tutorial under Linux
Mysql database installation tutorial under Linux
2022-07-05 14:11:00 【Full stack programmer webmaster】
1 . Install new version mysql front , The system's own mariadb-lib uninstall [[email protected] ~]# rpm -qa|grep mariadb mariadb-libs-5.5.52-1.el7.x86_64 [[email protected] ~]# rpm -e –nodeps mariadb-libs-5.5.52-1.el7.x86_64 2 Upload mysql :mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar 3 Create folder :mkdir /usr/local/mysql 3 Unzip the installation package to the target folder : tar -xvf mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar -C /usr/local/mysql
4 Use rpm -ivh Command to install in sequence , Installation sequence rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm mysql-community-libs-5.7.18-1.el7.x86_64.rpm( Depend on common) mysql-community-client-5.7.18-1.el7.x86_64.rpm( Depend on libs) mysql-community-server-5.7.18-1.el7.x86_64.rpm( Depend on common,client)
perl(Getopt::Long) is needed by mysql-community-server-5.7.18-1.el7.x86_64 perl(strict) is needed by mysql-community-server-5.7.18-1.el7.x86_64 It's very clear here , The lack of perl, perform yum install perl Then install , success ! 5 Start and stop MySQL After completing the installation steps , First configuration MySQL It starts automatically , Use it here systemctl command . # systemctl enable mysqld.service Then use systemctl start mysqld.service Command to start MySQL. # systemctl start mysqld.service And stop MySQL When using systemctl stop mysqld.service command . # systemctl stop mysqld.service 6 land MySQL At this time, we will encounter difficulties , You can't get in without a password : stay /ect/my.cnf Add a line on the last side of : skip-grant-tables Save and exit restart mysql service :service mysqld restart And then connect mysql That's all right. Get into mysql: use mysql; update mysql.user set authentication_string=password(‘123qwe’) where user=’root’; Then take it. my.cnf Delete the added line , And then use root Account and password entry mysql It needs to be reset after entering root password : SET PASSWORD = PASSWORD(‘[email protected]’); ALTER USER ‘root’@’localhost’ PASSWORD EXPIRE NEVER;// Set password never expires This password must conform to the password specification flush privileges;( To give immediate effect to ) Set up remote login : GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘[email protected]’ WITH GRANT OPTION; flush privileges;( To give immediate effect to ) 7 Set up firewall : Open port firewall-cmd –zone=public –add-port=3306/tcp –permanent service iptables restart firewall-cmd –reload See if the rule is in effect iptables -L -n
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/111284.html Link to the original text :https://javaforall.cn
边栏推荐
- 为什么我认识的机械工程师都抱怨工资低?
- 蓝桥杯学习2022.7.5(上午)
- Shen Ziyu, nouveau Président de Meizu: M. Huang Zhang, fondateur de Meizu, agira comme conseiller stratégique pour les produits scientifiques et technologiques de Meizu
- 魅族新任董事長沈子瑜:創始人黃章先生將作為魅族科技產品戰略顧問
- openGauss数据库源码解析系列文章—— 密态等值查询技术详解(下)
- Mingfeng medical sprint technology innovation board: annual revenue of 350million yuan, proposed to raise 624million yuan
- Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
- Deep copy is hard
- Brief introduction to revolutionary neural networks
- Fault analysis | analysis of an example of MySQL running out of host memory
猜你喜欢
如何将 DevSecOps 引入企业?
Oneconnect listed in Hong Kong: with a market value of HK $6.3 billion, ye Wangchun said that he was honest and trustworthy, and long-term success
魅族新任董事长沈子瑜:创始人黄章先生将作为魅族科技产品战略顾问
What are the advantages and characteristics of SAS interface
[js] basic syntax - for loop
Postman简介、安装、入门使用方法详细攻略!
Shenziyu, the new chairman of Meizu: Mr. Huang Zhang, the founder, will serve as the strategic adviser of Meizu's scientific and technological products
深拷贝真难
How to introduce devsecops into enterprises?
Guofu hydrogen energy rushes to the scientific and Technological Innovation Board: it plans to raise 2billion yuan, and 360million yuan of accounts receivable exceed the revenue
随机推荐
03_Solr之dataimport
魅族新任董事长沈子瑜:创始人黄章先生将作为魅族科技产品战略顾问
Sorter evolution of ticdc 6.0 principle
R语言ggplot2可视化:可视化折线图、使用theme函数中的legend.position参数自定义图例的位置
Postman简介、安装、入门使用方法详细攻略!
Linux下mysql数据库安装教程
牛客网:拦截导弹
明峰医疗冲刺科创板:年营收3.5亿元 拟募资6.24亿
蓝桥杯学习2022.7.5(上午)
Requests + BS4 crawl Douban top250 movie information
Current situation, trend and view of neural network Internet of things in the future
Scenario based technology architecture process based on tidb - Theory
VC development of non MFC program memory leak tracking code
R语言ggplot2可视化条形图:通过双色渐变配色颜色主题可视化条形图、为每个条形添加标签文本(geom_text函数)
R language ggplot2 visualization: visual line graph, using legend in theme function The position parameter defines the position of the legend
LeetCode_67(二进制求和)
汇编语言 assembly language
04_solr7.3之solrJ7.3的使用
R language uses the polR function of mass package to build an ordered multi classification logistic regression model, and uses the coef function to obtain the log odds ratio corresponding to each vari
TiFlash 面向编译器的自动向量化加速