Home > Database > Mysql Tutorial > body text

CentOS6.4 安装Mysql

WBOY
Release: 2016-06-07 15:41:19
Original
1059 people have browsed it

虽说,新版的数据包可能会带上一些新特性,但是数据库对我而言,还是稳定版优先.因为新特性不一定我会用到.. 下载安装: yum list | grep mysql 因为是准备搞开发用的,所以只要安装mysql mysql-devel mysql-server 这三个包就暂时满足所需了 yum -y install mysq

虽说,新版的数据包可能会带上一些新特性,但是数据库对我而言,还是稳定版优先.因为新特性不一定我会用到..

下载安装:

yum list | grep mysql

CentOS6.4 安装Mysql

因为是准备搞开发用的,所以只要安装mysql mysql-devel mysql-server 这三个包就暂时满足所需了

yum -y install mysql mysql-devel mysql-server

CentOS6.4 安装Mysql



这样就安装好了...接下来就是的介绍一下(yum可以帮忙解决一些依赖,省下不少时间了)





MySql简学:

初始化数据库:

service mysqld start      ---  mysqld [mysql daemon - mysql 守护进程)

CentOS6.4 安装Mysql



设置数据库管理密码及登录:

mysqladmin -u  root  password 'testpasswd'

mysql -u root -p

CentOS6.4 安装Mysql



显示当前拥有的数据库及查询数据存放路径:

show databases;    --- 显示当前系统的数据

create database crperData --- 创建一个名叫crperData的数据库

CentOS6.4 安装Mysql

mysql的配置文件叫my.cnf

cat /etc/my.cnf

CentOS6.4 安装Mysql

查看数据库的存放和日志存放:

ll /var/lib/mysql   --- 列出内部的数据库目录

ll  /var/log/mysqld.log  && cat !$  --- 列出和查看日志

CentOS6.4 安装Mysql

CentOS6.4 安装Mysql


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!