Preface Seeing the title, everyone should be thinking, how to install MySQL on Debian 9? Isn't that a simple thing? Wouldn't it be OK to just Unexpectedly, I encountered several problems that I had never encountered before, which wasted a lot of time. It turns out that in Debian 9, MySQL has been replaced by MariaDB, so there are some differences from the traditional installation of MySQL. Installation Method First of all, we can still install it with After installing it, I found that it was different from the traditional one because the blue interface for setting a password did not pop up. I mistakenly thought that I could log in directly with an empty password. I tried The first reaction is to execute After a while, I found that the default password of MaraiDB is indeed empty, but I can only log in with the root user Note: The user here refers to the root user of the Linux system. That is to say, after you enter the root terminal with sudo su, you can log in normally, but ordinary users cannot log in. (To distinguish them, I capitalized the first letter of the Root terminal and lowered the first letter of the mysql root user) I think we understand now, so we can't just use the root user for convenience. The correct way should be like this: First, install the database using Then sudo su switch to the root terminal, log in to the database through What you need to do now is to create a new user: Then set permissions for the new user: OK, we have set up another convenient "Root" user, but changed its name to admin. PS: I found that in the Root terminal, no matter what password I entered, I could connect to the database normally... dizzy. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed steps for deploying https websites and configuring address rewriting in Nginx
>>: React example showing file upload progress
Preface I believe that the syntax of MySQL is not...
In Docker Start all container commands docker sta...
Introduction to Nginx Nginx is a high-performance...
Method 1: float:right In addition, floating will ...
Preface This article aims to explain the most bor...
This article introduces the sample code of CSS3 c...
Table of contents The first method: When the MySQ...
ElementUI implements a table tree list loading tu...
Definition of Generics // Requirement 1: Generics...
Table of contents What is nginx 1. Download the r...
In a project, you often need to use environment v...
Vue parent component calls the function of the ch...
This article shares the specific code of JavaScri...
Table label composition The table in HTML is comp...
First, check whether the hard disk device has a d...