centos中安装mysql数据库
1.查看是否已有mysql数据库:
#rpm -qa |grep mysql
命令返回空,说明没有安装成功。
2.安装mysql
yum install mysql*
安装完成后,却发现只安装了JDBC和ODBC驱动。
3.安装MariaDB数据库
yum install mariadb*
(在Centos7中用MariaDB代替了mysql数据库。)
4.启动mariadb:
systemctl start mariadb
5.操作mariadb数据库:(密码是空的,在输入密码的位置,直接回车,按enter键)
[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 Server Copyright (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 |
+--------------------+
rows in set (0.00 sec) MariaDB [(none)]>
附录:
mariadb数据库常用命令如下:
systemctl start mariadb #启动
MariaDBsystemctl stop mariadb #停止
MariaDBsystemctl restart mariadb #重启
MariaDBsystemctl enable mariadb #设置开机启动
centos中安装mysql数据库的更多相关文章
- Windows10系统的Linux子系统中安装MySQL数据库心得
后端开发童鞋们, 自己开发机用的是Windows系统电脑(台式机或笔记本), 而开发的程序和使用的数据库等要运行在Linux服务器上, 这种情况有木有? 提前声明: 本文并不讨论操作系统的比较, 以及 ...
- CentOS下安装Mysql数据库
其实,安装mysql数据库还是比较容易的,安装方式可以分为源码安装和二进制包安装.安装简单,只需要 yum安装几个包就可以搞定,安装后续其实还需要简单做些工作,才可以使用. 环境:CentOS 6.5 ...
- 【linux系列】Centos下安装mysql数据库
前言 为了测试方便,通常我们会自己安装数据库,以下是在Centos上安装Mysql的操作. 一.检查自己是否安装了MySQL数据库 [root@s201 /home/mysql]#rpm -qa |g ...
- Linux CentOS 中安装 MySql
CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com ...
- centos中安装mysql
一.首先输入指令 rpm -qa|grep mysql 检查操作系统中是否已经安装了MySQL 可以通过 yum list | grep mysql 命令来查看yum上提供的mysql数据库可下载的版 ...
- Linux(CentOS)安装Mysql数据库
1.需要mysql-linux安装包 本次使用mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz进行安装 2.将此安装包上传至linux服务器 上传路径为:/usr ...
- CentOS 中安装 mysql 5.7+
参考:https://www.cnblogs.com/jimboi/p/6405560.html 1.下载rpm文件 wget https://dev.mysql.com/get/mysql57-co ...
- 在Centos中安装mysql
下载mysql 这里是通过安装Yum源rpm包的方式安装,所以第一步是先下载rpm包 1.打开Mysql官网 https://www.mysql.com/, 点击如图选中的按钮 点击如图框选的按钮 把 ...
- linux中安装mysql数据库
遇到ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ...
随机推荐
- jsp&Sevelet基础详解
1.用scriptlet标签在jsp中嵌入java代码: (1).<%!...%>可以在里面定义全局变量,方法,类,一般写在<head>内 (2).<%%>定义的是 ...
- javaBean Request生命周期
request: 在request范围内,JavaBean对象的有效范围为: ① 客户请求访问的当前JSP页面② 和当前JSP页面共享同一个请求的页面,包括<%@ include%>指令以 ...
- Android课程---时间日期对话框
activity_ui2.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout x ...
- The Earth Mover's Distance
The EMD is based on the minimal cost that must be paid to transform one distribution into the other. ...
- mysql前缀索引(字符串截取部分作为索引), 以及索引选择指引
- react-native win7环境搭建
时间:2016-08-22 晚,西安 1.安装jdk java version "1.6.0_45"Java(TM) SE Runtime Environment (build 1 ...
- cucumber learning : http://www.cnblogs.com/puresoul/category/340832.html
link Generate cucumber report by json website Sample as json file for cucumber report: [ { "key ...
- php写插件
1.写在最前 随着互联网飞速发展,lamp架构的流行,php支持的扩展也越来越多,这样直接促进了php的发展. 但是php也有脚本语言不可避免的问题,性能比例如C等编译型语言相差甚多,所以在考虑性能问 ...
- SPARK支持的常见文件格式
SequenceFile读写文件Scala\java类型对应表
- SLAM数据集
数据集 New College Dataset :: Main / Downloads Autonomous Space Robotics Lab: Devon Island Rover Naviga ...