Get the App
SLTechnology News&Howtos  ›  Database  › 

How to change mysql and pureftpd passwords

Shulou Source: shulou.com Published: 2022-06-01 19:44:55 10月05日 Update

The following mainly brings you how to modify the mysql and pureftpd passwords. I hope that how to change the mysql and pureftpd passwords can bring you practical use. This is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

[1] modify the password of a MySQL user

Step one:

Syntax for changing passwords before ① mysql5.7

Update mysql.user set password=password ('123') where user='root' and Host =' localhost'

Syntax for changing passwords after ② mysql5.7

Update mysql.user set authentication_string=password ('123qwe') where user='root' and Host =' localhost'

Use the password field to store passwords before 5.7. after 5.7, use the authentication_string field to store passwords.

Step 2:

Flush privileges

[2] modify pureftpd password

Principle: when pureftpd puts the login account and password in the mysql database, pureftpd needs to read the user name and password of the mysql database in the / ect/pure-ftpd/pureftpd-mysql.conf configuration file to connect to the database, and then get the login account and password in the corresponding table.

Step 1: if you need to change the user and password that pureftpd connects to the database

① views the user name and password of the connection in the pureftpd-mysql.conf configuration file

In mysql, do the following

Update mysql.user set authentication_string=password ('123qwe') where user='pureftpd'

② replaces the value of MYSQLPassword in pureftpd-mysql.conf with a modified password

Step 2: modify the login name and password of pureftpd. As you can see from the figure above, ftp reads the password of the corresponding login name from the ftpd table in the pureftpd database.

In MySQL, do the following

Update pureftpd.ftpd set Password=md5 ('123') where user='pureftpd'

Note: you can see from the MYSQLCrypt field in the configuration file that the md5 encryption algorithm is used, so it must be encrypted by the md5 () function, not by using the password () function.

For the above about how to modify the mysql and pureftpd password, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.

Tags: Password data database user login field file encryption configuration following text content function user name syntax account storage principle practice nonsense more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Tech Info Shulou Information Redmi Apple