Install MySQL server 5.6 – Part 1

I. INSTALL THE MYSQL SERVER 5.6

1. Login into the Server and download the yum repo rpm package

yum install wget

wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

Note 1: Another URL is http://dev.mysql.com/downloads/repo/

Note 2: if you see this error: Cannot retrieve metalink for repository: epel. Please verify its path and try again then use this command:

sudo yum upgrade ca-certificates --disablerepo=epel

2. Install the downloaded rpm package.

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

 

3. Install the mysql server by using yum command.

Note: The yum command by-default also install the dependencies

yum install mysql-community-server OR yum install mysql-server

 

4. Start the mysql server

/etc/init.d/mysqld start

Other options: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload}

5. Reset mysql password

mysql_secure_installation

Note: Because it is freshly installed hence root password is blank

6. Login to mysql using the new password

mysql -u root

II. INSTALL AND CONFIGURE PHPMYADMIN

yum install phpmyadmin

The phpMyAdmin package installs an Apache Virtual Host file that is used to configure web access. Open the file with the following command:

vim /etc/httpd/conf.d/phpMyAdmin.conf

By default, this configuration only allows access from the same computer that is hosting the software. Because the databases, web server, and administration software are hosted on a VPS instead of your home computer, we will have to adjust these values.

This is where the IP information about your home computer comes in handy. We will change every reference to 127.0.0.1 with the IP address you found. There should be four locations that you need to change:

. . .

Require ip your_workstation_IP_address

. . .

Allow from your_workstation_IP_address

. . .

Require ip your_workstation_IP_address

. . .

Allow from your_workstation_IP_address

. . .

service httpd start

See the Results, point your web browser to http://ip_address/phpmyadmin

III. NOTES

Some MySQL command:

# check mysql version

mysql> STATUS;

mysql> SHOW VARIABLES LIKE "%version%";

# show list of mysql packages installed

yum list installed | grep mysql

# Allow httpd connecto to remote db:

setsebool -P httpd_can_network_connect_db 1

 

Part 2: Using LVM as backup solution

LVM Information

About Terri

System Administrator @Netpower Datacenter

Posted on 01.10.2015, in Linux, Technical Articles and tagged , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: