![]() Here, you need to set the root account password as follows: $ sudo mysql_secure_installation Step 6: Make secure installation of MySQLīy executing the following command you can make the installation of the MySQL server more secure. ![]() You can check service running status by typing the following command: $ sudo systemctl status mysql Once the installation process is completed, MySQL services will automatically start on your system. In the next dialog, a message will display on the system in order to inform you about the MySQL 8.0 authentication.įirst, make sure that this authentication plugin is supported by your MySQL application, and then select the MySQL 8 authentication plugin. Leave it blank that will set further in this article. Here, you will be asked to enter the MySQL root user password. Therefore, update apt packages by using the following command: $ sudo apt update Step 4: Install MySQLĪfter updating the Debian apt repository, you will execute the below-given command to install the MySQL server packages on Debian 10: $ sudo apt install mysql-server The recommended method is to update the repository packages list before installing any new application on your system. Now, select ‘OK’ by pressing the ‘Tab’ key and hit ‘Enter’ that is also shown in the below-displayed image: You can select other versions according to your server requirements. mysql-apt-config_0.8.13-1_all.debĭuring the installation, the configuration menu will be displayed on the system where you can select the MySQL version that you want to install. Once the download of the latest release package is completed, install it by executing the following command with sudo privileges: $ sudo apt install. For this purpose, go to the download page of the repository and grab the latest release of the MySQL package by using the below-mentioned wget command: $ wget Step 2: Add or Configure MySQL Repository in Debian 10įor the installation of MySQL, you need to first add the MySQL apt repository to your Debian 10 system. Click on the terminal icon which will be displayed under the search bar: The following steps you need to follow to install the MySQL server on your Debian 10 system: Step 1: Open a terminalĬlick on the ‘Activities’ and then enter the terminal in the application search bar. You have sudo command access to run the administrative tasks. In this article, we will give you a demo on how to install the MySQL server on Debian 10. Therefore, you need to install the MySQL server with all its dependencies on your Debian 10 system. MariaDB is available as the default database in Debian 10. We can revoke privileges using the following command: GRANT ALL PRIVILEGES ON *.MySQL is a well-known and open-source relational database management system that is pre-installed on Linux Debian’s repository. However, we can grant privileges for specific databases as GRANT ALL PRIVILEGES ON database_name.* TO grant privileges to user, we need to flush the privileges FLUSH PRIVILEGES GRANT ALL PRIVILEGES ON *.* TO user have full access to the database with ALL PRIVILEGES and for all the databases as we are using *.* Now, let's grant the permission to the newly created user. If we want to create a user that can be connected from any machine then use the following command CREATE USER IDENTIFIED BY 'password' Here, use your own username and password and localhost as we are working on the same machine.įor example: CREATE USER IDENTIFIED BY 'testpassword' Now, create the user using the following command: CREATE USER IDENTIFIED BY 'password' Create a New Mysql Userīefore creating new users we need to first log in with the root user as mentioned above. Now, log in using the root credential mysql -u root -p Step 5. ![]() Use the following command to secure MySQL installation: sudo mysql_secure_installationĮnter your MySQL root password and answer all of the security questions. Test the MySQL version and MySQL status by using the below command: mysql -version After that MySQL is installed and running successfully. Next, the screen will pop up to enter the root password. If you chose the latest version of MySQL then no need to specify the package. Install the MySQL using the following command: sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* Now update the MySQL repository sudo apt-get update Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config) ![]() Preparing to unpack mysql-apt-config_0.8.12-1_all.deb. 36242 files and directories currently installed.) Now the configure suppose to get successful and we can see the output as below: Selecting previously unselected package mysql-apt-config.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |