当前位置:网站首页>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
边栏推荐
- 一网打尽异步神器CompletableFuture
- 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
- 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
- The IPO of Ruineng industry was terminated: the annual revenue was 447million and it was planned to raise 376million
- Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
- Judge whether the variable is an array
- Simple process of penetration test
- R语言ggplot2可视化:gganimate包基于transition_time函数创建动态散点图动画(gif)、使用shadow_mark函数为动画添加静态散点图作为动画背景
- Zhizhen new energy rushes to the scientific innovation board: the annual revenue is 220million, and SAIC venture capital is the shareholder
- UE source code reading [1]--- starting with problems delayed rendering in UE
猜你喜欢
TDengine 社区问题双周精选 | 第三期
Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
锚点导航小demo
Xampp configuring multiple items
Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
Brief introduction to revolutionary neural networks
如何深入理解“有限状态机”的设计思想?
SAS接口有什么优势特点
Comparison of several distributed databases
[js] basic syntax - for loop
随机推荐
Sorter evolution of ticdc 6.0 principle
R语言使用原生包(基础导入包、graphics)中的boxplot函数可视化箱图(box plot)
R語言ggplot2可視化:可視化折線圖、使用theme函數中的legend.position參數自定義圖例的比特置
Request + BS4 crawl Netease cloud music popular comments
What is the future development trend of neural network Internet of things
R language uses boxplot function in native package (basic import package, graphics) to visualize box plot
Financial one account Hong Kong listed: market value of 6.3 billion HK $Ye wangchun said to be Keeping true and true, long - term work
Laravel - view (new and output views)
Assembly language
Judge whether the variable is an array
Kunlun Taike rushes to the scientific innovation board: the annual revenue is 130million, and it plans to raise 500million. CETC Taiji holds 40% of the shares
Shenziyu, the new chairman of Meizu: Mr. Huang Zhang, the founder, will serve as the strategic adviser of Meizu's scientific and technological products
2022建筑焊工(建筑特殊工种)特种作业证考试题库及在线模拟考试
How to introduce devsecops into enterprises?
Requset + BS4 crawling shell listings
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
展现强大。这样手机就不会难前进
Show strength. In this way, the mobile phone will not be difficult to move forward
matlab学习2022.7.4
清大科越冲刺科创板:年营收2亿 拟募资7.5亿