Install MySql Server and Client phpMyadmin
Steps to Insatll & Secure MySql Server and Install phpmyadmin client
Step 1 : Run the below command to install, start, secure MySql server
sudo yum update -y
sudo yum install -y mysql56-server php70-mysqlnd
Step 1 : Run the below command to install, start, secure MySql server
sudo yum update -y
sudo yum install -y mysql56-server php70-mysqlnd
sudo
service mysqld start
sudo
mysql_secure_installation
When
prompted, type a password for the root account.
i. Type
the current root password. By default, the root account does not have a
password set.
Press
Enter.
ii. Type Y
to set a password, and type a secure password twice. For more information
about
creating a
secure password, see http://www.pctools.com/guides/password/. Make sure to
store this
password in a safe place.
Note
Setting a
root password for MySQL is only the most basic measure for securing
your
database. When you build or install a database-driven application, you
typically
create a database service user for that application and avoid using the
root
account for anything but database administration.
b. Type Y
to remove the anonymous user accounts.
c. Type Y
to disable the remote root login.
d. Type Y
to remove the test database.
e. Type Y
to reload the privilege tables and save your changes
Step 2 : Enable mysql on server boot
sudo
chkconfig mysqld on
Step 3: To check the service is running use below command
sudo netstat -ntpl | grep :3306
Step 4: To connect mysql server run below command
mysql -u root -p
Step 5: Configuration file location is vi /etc/my.cnf
Step 6 : Below is the steps given to install phpMyadmin client
Note: (Optional)
Install phpMyAdmin ( HTTPS then only
enable it)
sudo
yum install php70-mbstring.x86_64 php70-zip.x86_64 –y
sudo
service httpd restart
cd
/var/www/html
wget
https://files.phpmyadmin.net/phpMyAdmin/4.7.9/phpMyAdmin-4.7.9-all-languages.tar.gz
Extract
the package and change the name of the resulting directory to something more
Manageable
[ec2-user
html]$ tar -xvzf phpMyAdmin-latest-all-languages.tar.gz
[ec2-user
html]$ mv phpMyAdmin-4.7.5-all-languages phpMyAdmin
sudo
service mysqld start
http://my.public.dns.amazonaws.com/phpMyAdmin
Comments
Post a Comment