Configuration MYWEBSQL and MYSQL on RHEL AWS environment

About MY-WEBSQL

MyWebSQL is the desktop replacement for managing your MySQL databases over the web. With interface that works just like your favorite desktop applications, you don’t need to keep switching over webpages to get simple things done. Just login to your database and manage your database as if your are working on your desktop!

Install Apache (httpd)

Install the apache using below command

[root@ip-172-31-33-97 ec2-user]# yum install httpd

Check Apache status using below commands

[root@ip-172-31-33-97 ec2-user]# /etc/init.d/httpd status

httpd (pid  24844) is running…

Donwload and Install MYWEBSQL

Download the mywebsql using the link :

https://sourceforge.net/projects/mywebsql/files/stable/mywebsql-3.7.zip

Once download unzip the this folder under location
/var/www/html/mywebsql

Post this we can access mywebsql using URL

http://localhost/mywebsql

mywebsql

Post this we can login to our database using respective credentials.

Downloading the Package

Download the required version of mysql from the link here we are taking version (mysql57-community-release-el6-11.noarch.rpm )

https://dev.mysql.com/downloads/repo/yum/

[root@ip-172-31-33-97 ec2-user]# wget   https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm

2018-01-02 18:08:21 (29.8 MB/s) – ‘mysql57-community-release-el6-11.noarch.rpm’ saved [25664/25664]

Installing the RPM package

Once we have downloaded the required RPM we have to install the rpm using the command

sudo yum local-install platform-and-version-specific-package-name.rpm

install

You can check that the MySQL Yum repository has been successfully added by the following command (for Fedora, replace yum in the command with dnf):

enabledrepo

To install the latest release from a specific series other than the latest GA series, disable the subrepository for the latest GA series and enable the subrepository for the specific series before running the installation command. If your platform supports yum-config-manager, you can do that by issuing these commands, which disable the subrepository for the 5.7 series and enable the one for the 5.6 series:

 

shell> sudo yum-config-manager –disable mysql57-community

shell> sudo yum-config-manager –enable mysql56-community

Besides using yum-config-manager or the dnf config-manager command, you can also select a release series by editing manually the /etc/yum.repos.d/mysql-community.repo file. This is a typical entry for a release series’ subrepository in the file:

[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

 

Find the entry for the subrepository you want to configure, and edit the enabled option. Specify enabled=0 to disable a subrepository, or enabled=1 to enable a subrepository. For example, to install MySQL 5.6, make sure you have enabled=0 for the above subrepository entry for MySQL 5.7, and have enabled=1 for the entry for the 5.6 series:

# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

repo

we should only enable sub-repository for one release series at any time. When sub-repositories for more than one release series are enabled, the latest series will be used by Yum.

We should also verify that the correct sub-repositories have been enabled and disabled by running the following command and checking its output (for Fedora, replace yum in the command with dnf):

shell> yum repolist enabled | grep mysql

startstop

A superuser account ‘root’@’localhost is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command:

 

After successful installation of mysql we can login as root user and change the passwords using mentioned commands

shell> mysql -uroot -p

Also we can reset the password using the command
MySQL 5.7.6 and later:
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MyNewPass’;
MySQL 5.7.5 and earlier:
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘MyNewPass’);