Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

+1 -800-456-478-23

Linux Server Database MySQL Ubuntu Server

MYSQL SERVER ON UBUNTU SERVER

mysql

MySQL is an open-source relational database management system. RDBMS is a software or service used to create and manage databases based on a relational model. A database is simply a collection of structured data. A database is a place in which data is stored and organized. Source:https://www.hostinger.com/tutorials/what-is-mysql

root@snet[~]# sudo apt-get -y install mysql-server mysql-client

Securing MySQL Server

root@snet[~]# mysql_secure_installation

Enter password for user root: <– Enter the MySQL root password

Change the password for root? (Press y|Y for Yes, any other key for No): <– n

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : <– y

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : <– y Reload privilege tables now? (Press y|Y for Yes, any other key for No) : <– y

root@snet[~]# sudo systemctl restart mysql

CREATING OF NEW USER AND DATABASE

Be sure to change stephen to your preferred username and password to a strong password of your choosing as well as database name snet:

root@snet[~]# mysql -u root -p
root@snet[~]# CREATE USER 'stephen'@'localhost' IDENTIFIED BY 'password';
root@snet[~]# CREATE DATABASE snet;
root@snet[~]# GRANT ALL ON snet.* to 'stephen'@'localhost' IDENTIFIED BY 'password';
root@snet[~]# FLUSH PRIVILEGES;
root@snet[~]# exit
root@snet[~]# sudo systemctl restart mysql

Author

Stephen Fosu