Steps to install MySQL in Linux server
Prerequisites
You will need to have access to a superuser, or sudo account, so you can install the MySQL database software
Installation
First, update apt-get library
$ sudo apt-get update
Then install MySQL and its development libraries
$ sudo apt-get install mysql-server mysql-client libmysqlclient-dev
During the installation, your server will ask you to select and confirm a password for the MySQL "root" user. MySQL is now installed
Secure MySQL server
Run some additional commands to get our MySQL environment set up securely
First we need to tell MySQL to create its database directory structure where it will store its information
$ sudo mysql_install_db
Afterwards, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system
$ sudo mysql_secure_installation
Access MySQL server
To Access the MySQL shell
$ mysql -u root -p
After entering the MySQL root password into the prompt you can able to access MySQL server prompt.
First, update apt-get library
$ sudo apt-get update
Then install MySQL and its development libraries
$ sudo apt-get install mysql-server mysql-client libmysqlclient-dev
During the installation, your server will ask you to select and confirm a password for the MySQL "root" user. MySQL is now installed
Secure MySQL server
Run some additional commands to get our MySQL environment set up securely
First we need to tell MySQL to create its database directory structure where it will store its information
$ sudo mysql_install_db
Afterwards, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system
$ sudo mysql_secure_installation
Access MySQL server
To Access the MySQL shell
$ mysql -u root -p
After entering the MySQL root password into the prompt you can able to access MySQL server prompt.
No comments:
Post a Comment