当前位置:网站首页>day10--install mysql on linux
day10--install mysql on linux
2022-07-30 03:45:00 【Ning Mang】
1. Download the installation package and upload it to linux
2. Create a new directory mysql in the /usr/local directory
1) Enter /usr/local
Command: cd /usr/local
2) Create a directory
Command: mkdir mysql
3. Unzip the mysql installation package
1) Enter the installation path of the mysql installation package
Command: cd /home/xqy
2) Unzip the installation package to /usr/local/mysql
Command: tar -xvf MySQL-5.6.22-1.el6.i686.rpm-bundle.tar -C /usr/local/mysql
4. Install mysql under /usr/local/mysql
1) Install the server side: rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm
2) Install the client: rpm -ivh MySQL-client-5.6.22-1.el6.i686.rpm
5. Start mysql
Command: service mysql start
6. Add mysql to the system service and set the startup to start
Command: chkconfig --add mysql Add to system service
Command: chkconfig mysql on autostart
7. Login to mysql
1) After mysql is installed, a temporary random password will be generated, which is stored in /root/.mysql_secret
Command: cat /root/.mysql_secret View file content

2) Log in to mysql
Command: msyql –u root -p
3) Modify mysql password
Command: set password = password('root');
4) Open mysql remote login
By default, mysql does not support remote login to mysql for security reasons, so you need to set the permission to enable remote login to mysql
Command : grant all privileges on *.* to 'root' @'%' identified by 'root';
Flush privileges;
5) Open Linux port 3306 for external access
Enter the command in the linux environment:
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save to permanently save changes to the firewall
边栏推荐
- 微服务CAP原则
- OpenFeign implementation downgrade
- Nacos namespace
- EasyCVR启动时报错“no such file or directory”,该如何解决?
- Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Work (7) Interim Inspection Report
- LoadBalancer load balancing
- 数据湖:数据集成工具DataX
- 使命、愿景、价值观到底有什么区别
- Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (6) Question Opening Reply PPT
- Starlight does not ask passers-by!The young lady on the Wuhan campus successfully switched to software testing in three months and received a salary of 9k+13!
猜你喜欢
随机推荐
spicy(一)基本定义
Record NLP various resource URLs
NLP Natural Language Processing (1)
Drools(7):WorkBench
FreeRTOS个人笔记-内存管理
Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (7) Interim Inspection Report
Sentinel Traffic Guard
nSoftware.PowerShell.Server.2020
数据湖:数据集成工具DataX
小程序毕设作品之微信二手交易小程序毕业设计成品(6)开题答辩PPT
一直空、一直爽,继续抄顶告捷!
BindingExpression path error: ‘selectMenusList‘ property not found on ‘object‘ ‘‘ViewModel“
OpenFeign realize load balance
Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Products (6) Question Opening and Defense PPT
sqlmap使用教程大全命令大全(图文)
TCP congestion control technology and acceleration principle of BBR
Starlight does not ask passers-by!The young lady on the Wuhan campus successfully switched to software testing in three months and received a salary of 9k+13!
小程序毕设作品之微信二手交易小程序毕业设计成品(2)小程序功能
EasyNVR平台级联到EasyCVR,视频播放一会就无法播放是什么原因?
Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (3) Background Functions









