redhat7安装mysql-server(mysqld)
2015-11-14 16:22
543 查看
折腾…………原文地址:
http://sharadchhetri.com/2014/07/31/how-to-install-mysql-server-5-6-on-centos-7-rhel-7/
--------------
In this tutorial we will learn, how to install MySQL Server 5.6 on CentOS 7 / RHEL 7 . In our previous post, we have installed MySQL
Server 5.6 on CentOS 6.x/RHEL 7.x.
In CentOS 7/ RHEL 7 , now MariaDB is introduced as a defualt database. Still many Organisations/Company would like to continue with MySQL. Whereas System Admin who earlier worked on MySQL can easily work on MariaDB. MariaDB is a community-developed fork of
the MySQL relational database management system.
MariaDB’s lead developer is Michael “Monty” Widenius, the founder of MySQL and Monty Program AB. He had previously sold his company, MySQL AB, to Sun Microsystems for US$1 billion. MariaDB is named after Monty’s younger daughter, Maria. (Reference taken from Wikipedia)
Follow the given below steps to install MySQL Server 5.6 .
You must be login with root user in system
Download the rpm package, which will create a yum repo file for MySQL Server installation.
http://sharadchhetri.com/2014/07/31/how-to-install-mysql-server-5-6-on-centos-7-rhel-7/
--------------
In this tutorial we will learn, how to install MySQL Server 5.6 on CentOS 7 / RHEL 7 . In our previous post, we have installed MySQL
Server 5.6 on CentOS 6.x/RHEL 7.x.
In CentOS 7/ RHEL 7 , now MariaDB is introduced as a defualt database. Still many Organisations/Company would like to continue with MySQL. Whereas System Admin who earlier worked on MySQL can easily work on MariaDB. MariaDB is a community-developed fork of
the MySQL relational database management system.
MariaDB’s lead developer is Michael “Monty” Widenius, the founder of MySQL and Monty Program AB. He had previously sold his company, MySQL AB, to Sun Microsystems for US$1 billion. MariaDB is named after Monty’s younger daughter, Maria. (Reference taken from Wikipedia)
Install MySQL Server 5.6 on CentOS 7 / RHEL 7
Follow the given below steps to install MySQL Server 5.6 .You must be login with root user in system
Download the Yum Repo package of MySQL Server 5.6
Download the rpm package, which will create a yum repo file for MySQL Server installation.yum install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm[/code]Install this downloaded rpm package by using rpm command.
Install mysql-community-release-el7-5.noarch.rpm packagerpm -ivh mysql-community-release-el7-5.noarch.rpm
After the installation of this package. We will get two new yum repo related to MySQL[root@localhost ~]# ls -1 /etc/yum.repos.d/mysql-community* /etc/yum.repos.d/mysql-community.repo /etc/yum.repos.d/mysql-community-source.repo [root@localhost ~]#By using yum command, now we will install MySQL Server 5.6 . All dependencies will be installed itself.
Installing MySQL Serveryum install mysql-serverNow MySQL Server is installed on your system.
How to start/stop/restart MySQL Server
To start MySQL Service, run commandsystemctl start mysqld
To stop MySQL Service, run commandsystemctl stop mysqld
To restart MySQL Service, run commandsystemctl restart mysqld
To get status of MySQL Service, run commandsystemctl status mysqldOn fresh installation of MySQL Server. The MySQL root user password is blank.
Reset MySQL root password
For good security practice, we should reset the password MySQL root user.
On newly installed MySQL Server, we generally recommend to use the command script. You have to just follow the instructions.mysql_secure_installation
In another method,you can log into MySQL server database and reset the password in secure way.mysql -u root
You will see mysql prompt like this mysql> . Use the below given commands to reset root’s password.mysql> use mysql; mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit
相关文章推荐
- Mysql索引介绍及常见索引类别(主键索引、唯一索引、普通索引、全文索引、组合索引)的区别
- MySQL 查询case
- MySQL常用操作
- MySQL存储引擎总结
- MYSQL卸载
- hive配置mysql元数据
- mysql使用笔记:常用的数据库命令
- 如何在 MySQL 中判断中文字符?
- MySQL数字类型中的三种常用种类
- mysql命令行备份数据库
- mysql使用笔记:有则更新,无则插入
- MySQL常用的指令
- mysql error 1064
- Mysql使用技巧
- MYSQL添加远程用户或允许远程访问三种方法
- VS2012+EF6+MYSQL配置
- mysql输入密码闪退
- mysql相关
- mysql 远程root赋予创建用户权限
- mysql 5.6 版本,对在使用的表进行分区