Jump to content
Froxlor Forum
  • 0

Problem creating a database


Juan

Question

Hi,

I've already installed everything, I created customers and domains. When I try to create a new database inside a customer it always shows me this message: "SQLSTATE[HY000]: General error: 1819 Your password does not satisfy the current policy requirements", it doesn't matter the size of the password, special characters, numbers, uppercase, etc. I thought that it was a problem in mysql, but with the same password I'm able to create a user in phpmyadmin and terminal. 

Any ideas?

Thanks

Captura de Pantalla 2019-07-19 a la(s) 21.47.33.png

Captura de Pantalla 2019-07-19 a la(s) 21.54.15.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

mysql -h localhost -u root -p

###Set the new type of validation

SET GLOBAL validate_password_policy=0; //For Low

###Restart mysql
sudo service mysql restart

 

or you can use a password, which has fewer special characters, some programs have problems with it. Best example is there dovecot.

Link to comment
Share on other sites

  • 0

Never mind, I found the problem, in /lib/classes/database/manager/class.DbManagerMySQL.php you have a function called grantPrivilegesTo. 

 
                $stmt = Database::prepare("
                                GRANT ALL PRIVILEGES ON `" . $username . "`.*
                                TO :username@:host IDENTIFIED BY 'password'
                                ");
                Database::pexecute($stmt, array("username" => $username, "host" => $access_host));

Because my mysql server configuration requires strong passwords, using the string "password" doesn't work even when you change it in the next lines.

The code should be something like this:

                $stmt = Database::prepare("
                                GRANT ALL PRIVILEGES ON `" . $username . "`.*
                                TO :username@:host IDENTIFIED BY :password 
                                ");
                Database::pexecute($stmt, array("username" => $username, "host" => $access_host, "password" => $password));

 

Now I have Froxlor working OK.

Hope it helps, 

Juan

Link to comment
Share on other sites

  • 0
On 7/20/2019 at 11:17 PM, Juan said:

Never mind, I found the problem, in /lib/classes/database/manager/class.DbManagerMySQL.php you have a function called grantPrivilegesTo. 


 
                $stmt = Database::prepare("
                                GRANT ALL PRIVILEGES ON `" . $username . "`.*
                                TO :username@:host IDENTIFIED BY 'password'
                                ");
                Database::pexecute($stmt, array("username" => $username, "host" => $access_host));

Because my mysql server configuration requires strong passwords, using the string "password" doesn't work even when you change it in the next lines.

The code should be something like this:


                $stmt = Database::prepare("
                                GRANT ALL PRIVILEGES ON `" . $username . "`.*
                                TO :username@:host IDENTIFIED BY :password 
                                ");
                Database::pexecute($stmt, array("username" => $username, "host" => $access_host, "password" => $password));

 

Now I have Froxlor working OK.

Hope it helps, 

Juan

Sounds legit and makes sense...thanks for the hint

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...