zoukankan      html  css  js  c++  java
  • 在Linux上安装MySQL

    1、准备环境:安装一个MySQL数据库
    数据库的连接池 ----> 返回的Connection,不是真正的Connection,而是一个代理对象
    准备环境:安装一个MySQL数据库

    			在虚拟机上安装MySQL:
    			yum remove mysql-libs 
    			rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm
    			rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm
    			rpm -ivh mysql-community-client-5.7.19-1.el7.x86_64.rpm
    			rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm
    			rpm -ivh mysql-community-devel-5.7.19-1.el7.x86_64.rpm  (可选)
    						
    				启动MySQL:service mysqld start
    				或者:systemctl start mysqld.service
    
    				查看root用户的密码:cat /var/log/mysqld.log | grep password
    				登录后修改密码:alter user 'root'@'localhost' identified by 'Welcome_1';
    
    			MySQL数据库的配置:
    			创建一个新的数据库:create database hive;
    			创建一个新的用户:
    			  create user 'hiveowner'@'%' identified by 'Welcome_1';
    			  
    			给该用户授权
    			   grant all on hive.* TO 'hiveowner'@'%'; 
    			   grant all on hive.* TO 'hiveowner'@'localhost' identified by 'Welcome_1';
  • 相关阅读:
    WCF使用net.tcp寄宿到IIS中
    (转)Dubbo 简单Dome搭建
    Linux压缩解压
    Linux关闭开启防火墙命令
    简单登录(jsp+servlet)
    UVa 10285 Longest Run on a Snowboard [DP]
    UVa 1218 Perfect Service [DFS+DP]
    第三届ACM山东省赛 Pick apples [贪心+动规]
    ZOJ 3326
    HDU 1029
  • 原文地址:https://www.cnblogs.com/notes-study/p/8435704.html
Copyright © 2011-2022 走看看