center os7 安装mysql
安装mariadb
MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方式来避开这个风险。MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。
安装mariadb,大小59 M。
[root@yl-web yl]# yum install mariadb-server mariadb
mariadb数据库的相关命令是:
systemctl start mariadb #启动MariaDB
systemctl stop mariadb #停止MariaDB
systemctl restart mariadb #重启MariaDB
systemctl enable mariadb #设置开机启动
所以先启动数据库
[root@yl-web yl]# systemctl start mariadb
然后就可以正常使用mysql了
[root@yl-web yl]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.41-MariaDB MariaDB ServerCopyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.00 sec)MariaDB [(none)]>
安装mariadb后显示的也是 MariaDB [(none)]>
卸载mysql:
- [root@localhost usr]# yum remove mysql mysql-server mysql-libs compat-mysql51
- [root@localhost usr]# rm -rf /var/lib/mysql
- [root@localhost usr]# rm /etc/my.cnf
方式2(mysql ):
官网下载安装mysql-server
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server
默认安装完没有密码
use mysql
set password for 'root'@'localhost' =password('password');设置mysql登录密码
相关文章:

LeetCode实战:最长公共前缀
题目英文 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. Example 1: Input: ["flower","flow","flight"] Output: "fl"…

软件测试培训需要学习什么技术
软件测试技术相对于IT行业的其他技术,学习起来是比较简单的,大多数零基础学员想要进入到IT行业都会优先选择软件测试,那么具体软件测试培训需要学习什么技术呢?来看看下面的介绍就知道了。 软件测试培训需要学习什么技术? 每个软件在上线之…

检测晃动的三种方法
http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone 我的实现(基于Eran Talmor): 没必要application.applicationSupportsShakeToEdit YES; Set the applicationSupportsShakeToEdit property in th…

android随手记
Linearlayout: gravity:本元素中所有子元素的重力方向 layout_gravity:本元素对于父元素的重力方向 自定义权限:http://www.cnblogs.com/it-tomorrow/p/4115161.html 注意:1 .在被调用时就算是normal权限也需要在加入,不然会permission Deney,在…

LeetCode实战:最接近的三数之和
题目英文 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Example: Given ar…

零基础学习UI设计有哪些简单有效的方法
UI设计的普及让越来越多的人对UI有了重新的认识,很多企业对UI设计这个岗位都是非常重视的,如今很多零基础学员都想要转行做UI设计,那么针对零基础学习UI设计有哪些简单有效的方法呢?来看看下面的详细介绍吧。 零基础学习UI设计有哪些简单有效…

(转)linux下oracle instant client安装和运行
1.首先要知道什么是ORACLE的客户端: Oracle Instant client 是oracle提供的简便客户端, 支持多种平台. 可从oracle网站下载, 下载地址为http://www.oracle.com/technology/tech/oci/instantclient/index.html 包括如下内容: Instant client Package - Basic 运行OCI…

LeetCode实战:删除排序数组中的重复项
题目英文 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra me…

16G 手机清理
1.16G 手机清理 清理top 5 的应用的缓存即可 2,hw wife 连接模块 低于 app wifi 的连接模块。 在同样的电脑热点面前,hw 连补上电脑热点,apple 可以连上电脑热点。 其他差异不大。 2.奇兔刷机 tencent应用宝 and 手机管理,备份软件 http://w…

java培训有哪些收费标准
随着学习java技术的人越来越多,市面上的java培训机构也越来越多,每家机构的收费标准都不一样,这让很多想要学习java技术的小伙伴都比较头疼,下面小编就为大家详细的介绍一下java培训有哪些收费标准?如何来评判适合自己的java培训…

使用ASP.NET操作IIS7中使用应用程序
在最新发布的启明星Portal里,增加了安装程序,下面说一下.NET对IIS7操作。IIS7的操作和IIS5/6有很大的不同,在IIS7里增加了 Microsoft.Web.Administration 命名空间里,增加了ServerManager、Site几个大类来操作IIS7。 下面是一些核…

MYSQL体系结构-来自期刊
MYSQL体系结构-来自期刊 MySQL三层体系结构|-----------------------------------------------------------------------------------| | mysqld-SQL层 | |-------------------------------------------…

LeetCode实战:搜索旋转排序数组
题目英文 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If found in the array return its index, otherwise retur…

Python内置数据结构之双向队列
经常听说Python就是一门执行速度低的语言,可能是你的程序中使用了复杂的算法与数据结构,才会导致程序执行速率低的。在Python的标准库中提供了常见的数据结构工开发者使用,不仅执行速率比较快,还可以简化开发者的编程工作。下面我…

C# GDAL 学习一
最近一直琢磨如何用C#GDAL读取栅格数据(.tif或.img),运气不错的在GDAL 的官网上找到一部分源码。经过本人测试,效果还不错。学习还将继续深入下去。 参考网址:http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csh…

LeetCode实战:字符串相加
题目英文 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100.Both num1 and num2 contains only digits 0-9.Both num1 and num2 does not contain any leadin…

js中修改this的指向方法整理
JavaScript(简称“JS”) 是一种具有函数优先的轻量级,解释型或即时编译型的编程语言。虽然它是作为开发Web页面的脚本语言而出名,但是它也被用到了很多非浏览器环境中,JavaScript 基于原型编程、多范式的动态脚本语言,并且支持面向…

VC运行时库(/MD、/MT等)
VC项目属性→配置属性→C/C→代码生成→运行时库 可以采用的方式有:多线程(/MT)、多线程调试(/MTd)、多线程DLL(/MD)、多线程调试DLL(/MDd)、单线程(/ML)、单线程调试(/MLd)。 Reusable LibrarySwitchLibraryMacro(s) DefinedSingle Threaded/MLLIBC(none)Static Mu…

函数式编程概述
2019独角兽企业重金招聘Python工程师标准>>> 引子 JDK8中引入了lambda函数式编程的概念,那么什么是函数式编程,函数式编程又有什么好处,今天我们就来说说函数式编程 我们先了解一下函数式编程的由来 一个名叫阿隆佐邱奇的数学家设…

LeetCode实战:字符串相乘
题目英文 Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Example 1: Input: num1 "2", num2 "3" Output: "6"Example 2: Input: num1 &q…

UI培训教程之系统图标如何设计?
UI设计在近几年广受大家的关注,学习UI设计的人越来也多,今天小编要介绍的就是其中的系统图标设计方法,系统图标在UI设计中是非常基础的图形化语言,也在页面交互中起到很重要的作用。单个图标的设计并不难,但是系统化、…

看懂SQL Server的查询计划(绝对好文!)
在园子看到一篇SQLServer关于查询计划的好文,激动啊,特转载。原文出自:http://www.cnblogs.com/fish-li/archive/2011/06/06/2073626.html看懂SqlServer查询计划对于SqlServer的优化来说,可能优化查询是很常见的事情。关于数据库的优化,本身也…
LeetCode实战:全排列
题目英文 Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1] ]题目中文 给定一个没有重复数字的序列,返回其所有可能的全排列。 示例: 输入: …

git pull出现There is no tracking information for the current branch
使用git pull 或者 git push 的时候报错 gitThere is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull <remote> <branch> If you wish to set tracking information…

零基础快速学习Java技术的方法整理
在学习java技术这条道路上,有很多都是零基础学员,他们对于java的学习有着很多的不解,不知怎么学习也不知道如何下手,其实Java编程涉及到的知识点还是非常多的,我们需要制定java学习路线图这样才能少走弯路,…

转 深入理解Midlet类
在J2ME编程过程中,MIDlet是最核心的类之一,熟悉该类的使用是J2ME学习过程中必须首先掌握的类,下面就结合实际介绍一下该类的实际使用。 众所周知,J2ME程序都是从MIDlet类开始执行,系统规定了MIDlet的生命周期。规定MID…

LeetCode实战:最大子序和
题目英文 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Output: 6 Explanation: [4,-1,2,1] has the largest sum 6.Follow up…

PHP如何更好的利用PHPstorm的自动提示
说明 写了一段时间的java之后,特别不习惯PHP本身的弱类型方式,在写代码的时候总觉得不怎么放心,特别本身PHP又是弱类型的语言,所以在编码的时候,很多时候是没有代码提示的。 一个一般例子 class Data {public $name;pu…

2021年Java面试题目最新总结【90%面试会踩的坑】
学会java技术之后大家面临的最多的问题就是面试这关,求职面试java岗位是否能够成功是直接影响我们的工作机会的,所以对于Java程序员面试你准备好了吗?今天小编汇总了一下关于Java程序员面试,90%会踩到的坑。 2021年Java面试题目最新总结【90…

LeetCode实战:螺旋矩阵
题目英文 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Input: [[ 1, 2, 3 ],[ 4, 5, 6 ],[ 7, 8, 9 ] ] Output: [1,2,3,6,9,8,7,4,5]Example 2: Input: [[1, 2, 3, 4],[5, 6, 7, 8],[9,10,11,…