码迷,mamicode.com
首页 > 数据库 > 详细

安装MySql

时间:2020-02-24 16:57:04      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:name   localhost   client   mysql   user   man   ide   arch   防火墙   

MySql的安装

下载地址:https://downloads.mysql.com/archives/community/

name=MySQL 5.7 Community Server
33 baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
rpm -ivh mysql57-community-release-el7-3.noarch.rpm
yum install -y mysql-community-server

查找安装位置:

rpm -qa | grep mysql
rpm -ql mysql-community-client-5.7.29-1.el7.x86_64
rpm -qal | grep mysql
yum search mysql
find / -name mysql
which mysql
whereis mysql
开启软件
ps -aux | grep mysql
ps -el | grep mysql

systemctl start mysqld
systemctl enable mysqld
grep ‘password‘ /var/log/mysqld.log
mysql -u root -p

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘Root123@‘;

开启远程访问

在mysql中执行:
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘Root123@‘ WITH GRANT OPTION;

firewall-cmd --zone=public --add-port=3306/tcp --permanent
重启防火墙:firewall-cmd --reload

安装MySql

标签:name   localhost   client   mysql   user   man   ide   arch   防火墙   

原文地址:https://www.cnblogs.com/windlog/p/12357511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!