Linux安装jdk
yum install -y java-1.8.0-openjdk*
Linux安装mysql5.7
下载并安装官方的YUM REPOSITORY
下载包
[root@localhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
安装MYSQL客户端
[root@localhost ~]# yum -y install mysql57-community-release-el7-10.noarch.rpm
安装MYSQL服务端
[root@localhost ~]# yum -y install mysql-community-server
配置
启动MYSQL
[root@localhost ~]# systemctl start mysqld.service
查看运行状态
[root@localhost ~]# systemctl status mysqld.service
进入数据库
[root@localhost ~]# mysql -uroot -p
初始化密码
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
查看初始密码
grep "password" /var/log/mysqld.log
问题
遇到问题1:Linux安装报错
解决
问题2:远程不能连接服务器数据库
解决:
update user set host = '%' where user ='root';
Host设置为‘%’,远程就可以访问了,然后使用下面命令使配置立即生效
flush privileges