Tuesday, February 10, 2015

How to install MySQL Server 5.6 on CentOS 7 / RHEL 7

 
Remove mariadb
 
yum remove mariadb-server
yum remove mariadb-libs
 
step to install
 
yum install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

[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 ~]#

Installing MySQL Server

 
yum install mysql-server


To start MySQL Service, run command

systemctl start mysqld

To stop MySQL Service, run command
systemctl stop mysqld

To restart MySQL Service, run command
systemctl restart mysqld


To get status of MySQL Service, run command
systemctl status mysqld
 

Reset MySQL root password

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
     

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...