Step 5: Testing MySQL
Post the installation step, the Nginx service already starts running and to verify the status of your service, use the command:
sudo systemctl status mysql.service
Output mysql.service – MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en Active: active (running) since Wed 2018-04-23 21:21:25 UTC; 30min ago Main PID: 3754 (mysqld) Tasks: 28 Memory: 142.3M CPU: 1.994s CGroup: /system.slice/mysql.service └─3754 /usr/sbin/mysqld
The re-testing of the MySQL server can be done using the mysqladmin tool by the command -u root (for root) and -p (for password):
sudo mysqladmin -p -u root version
The below output verifies the successful running of the MySQL server.
Output mysqladmin Ver 8.42 Distrib 5.7.21, for Linux on x86_64 Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.7.21-1ubuntu1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 30 min 54 sec Threads: 1 Questions: 12 Slow queries: 0 Opens: 115 Flush tables: 1 Open tables: 34 Queries per second avg: 0.006
These are the procedures to install a MySQL server on Ubuntu 18.04. Here, we have installed MySQL by first updating the default packages, carried out a general configuration which is an optional one and further, configured root user authentication and other privileges. The successful execution of these installation and configuration steps is verified by the output in Testing MySQL phase.
Pages: 1 2