How To Install Mysql On Ubuntu 14.04 LTS: Technical Support Tutorial S
How To Install Mysql On Ubuntu 14.04 LTS: Technical Support Tutorial S
How To Install Mysql On Ubuntu 14.04 LTS: Technical Support Tutorial S
04 LTS
Category: Technical Support, Tutorial s
Pre-Flight Check
• These instructions are intended for installing MySQL on a single Ubuntu 14.04 LTS node.
• I’ll be working from a Liquid Web Self Managed Ubuntu 14.04 LTS server, and I’ll be
logged in as root.
Step 1: Install MySQL
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before
installing anything new.
apt-get update
This is an administrative account in MySQL with elevated privileges; enter a strong password.
Then you’ll be asked to verify the root MySQL password:
That’s it! Your basic MySQL installation is now complete!
Step 2: Configure and Secure MySQL for Use
Now we’ll instruct MySQL to create its database directory structure:
mysql_install_db
And now let’s secure MySQL by removing the test databases and anonymous user created by
default:
mysql_secure_installation
You’ll be prompted to enter your current password. Enter the root MySQL password set during
installation:
Then, assuming you set a strong root password, go ahead and enter n at the following prompt:
Remove anonymous users, Y:
Disallow root logins remotely, Y:
Remove test database and access to it, Y:
And reload privilege tables, Y:
Step 3: Verify MySQL Installation
You can check the version of the MySQL installation with the following command:
mysql -V
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
Exit the command line with the following command:
exit
To stop MySQL:
service mysql stop
To start MySQL:
service mysql start
To restart MySQL:
service mysql restart
Be Sociable, Share!