- Ubuntu - On the Cloud
- Ubuntu - Docker
- Ubuntu - Node.js
- Ubuntu - Installing MySQL & Python
- Ubuntu - Virtual Machines
- Ubuntu - Nginx
- Ubuntu - Development
- Ubuntu - Secure Shell
- Ubuntu - Server Installation
- Ubuntu - Networking
- Ubuntu - Scripting
- Ubuntu - Command Line
- Ubuntu - LibreOffice
- Ubuntu - Spreadsheets
- Ubuntu - Word Writer
- Ubuntu - Files & Folders
- Ubuntu - User Management
- Ubuntu - Media Players
- Ubuntu - Messaging
- Ubuntu - Email
- Ubuntu - Browsers
- Ubuntu - Software Center
- Ubuntu - Device Drivers
- Ubuntu - Environment
- Ubuntu - Flavors
- Ubuntu - Overview
- Ubuntu - Home
Ubuntu Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Ubuntu - Instalpng MySQL and Python
MySQL and Python are famous database and development software respectively. These are normally installed on Linux-based systems. Let’s see how we can get them installed on Ubuntu server environments.
Instalpng Python
The first thing to do is to find out what is the version of Python installed on the system. We can find this issuing the following command.
Python –v
Where the –v option specifies to show what is the version of Python installed. The following screenshot shows a sample of the output of the above command.
![Python Version](/ubuntu/images/python_version.jpg)
From the above output, we can see that the version of Python installed is version 2.7.
There is another way to see if Python is installed via the following commands.
Python –V
Python3 –V
The later command is used to see the version 3 of Python installed.
![Python Installed Version](/ubuntu/images/python_installed_version.jpg)
If we want to have the latest version of Python installed, then we need to issue the following statement.
sudo apt-get install python3
The above command will download the necessary packages for Python and have it installed.
Instalpng MySQL
To install MySQL, the following steps need to be followed.
Step 1 − Issue the apt-get command to ensure all operating system packages are up to date.
sudo apt-get update
![OS Update](/ubuntu/images/os_update.jpg)
Step 2 − Once all the packages have been updated, it is time to get the packages for MySQL.
sudo apt-get install mysql-server
The above command will start the download of all the relevant packages for MySQL.
Once the download completes and the installation starts, the installer will first ask to configure a root password.
Step 3 − Enter the required password and cpck the OK button. It will also prompt to re-enter the password.
![Enter Required Password](/ubuntu/images/enter_required_password.jpg)
![Re-enter Password](/ubuntu/images/reenter_password.jpg)
Step 4 − To see the MySQL process running, run the following command.
ps –ef | grep mysql
The following screenshot shows mysqld which is the daemon process for mysql running in the background.
![Daemon Process](/ubuntu/images/daemon_process.jpg)
Step 5 − To configure mysql, run the following command.
/usr/bin/mysql_secure_installation
![Configure Mysql](/ubuntu/images/configure_mysql.jpg)
It prompts to enter the root password which was entered during the installation process.
Step 6 − Enter the password and hit Enter.
Now, it prompts on whether we want to change the root password.
Step 7 − Enter ‘N’ for No and proceed.
Again, it prompts on whether we want to remove the Anonymous access.
![Remove Anonymous Access](/ubuntu/images/remove_anonymous_access.jpg)
Step 8 − When connecting from other machines on this database, it is advised to keep the default options as ‘N’ for both anonymous users and disallow root login remotely.
![Connecting Machines](/ubuntu/images/connecting_machines.jpg)
Step 9 − It is advised to provide the option as No for the options of Remove test database as well. We can enter ‘Y’ to reload the privileges table.
Finally, the configuration of MySQL will be complete.
Advertisements