Fresh Install Debian 10, Installed fog getting "Database connection unavailable"
-
yes it is set there also
-
@MTrejo2019 And you are able to login using that exact password on the mysql console?
Please try resetting to the older authentication mechanism:
mysql> ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY 'youpassword'; mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword'; mysql> FLUSH PRIVILEGES;
-
this error:
-
@MTrejo2019 Ok, this is not getting us anywhere. Give me some 20 minutes and I will spin up a Debian 10 server and try to figure this out.
-
Found this in the apache2 error log:
[Thu Jul 25 15:02:43.293072 2019] [proxy_fcgi:error] [pid 4063] [client 10.10.2.58:54110] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Exception: Connection to mysql failed with message: SQLSTATE[HY000] [1049] Unknown database ‘fog’ in /var/www/html/fog/lib/db/mysqldump.class.php:282\nStack trace:\n#0 /var/www/html/fog/lib/db/mysqldump.class.php(306): Mysqldump->connect()\n#1 /var/www/html/fog/lib/fog/schema.class.php(200): Mysqldump->start(’/tmp/fog_backup…‘)\n#2 /var/www/html/fog/lib/fog/reportmaker.class.php(269): Schema->exportdb(‘fog_backup_2019…’)\n#3 /var/www/html/fog/maintenance/backup_db.php(23): ReportMaker->outputReport(3, true)\n#4 {main}\n thrown in /var/www/html/fog/lib/db/mysqldump.class.php on line 282’
[Thu Jul 25 15:06:01.089717 2019] [mpm_prefork:notice] [pid 4060] AH00169: caught SIGTERM, shutting down -
@MTrejo2019 Yes, if you re-run the installer it tries to make a backup copy of the database and because the DB
fog
is not created yet it fails. -
@MTrejo2019 You seem to manually have installed a different MariaDB version. Mine says
Server version: 10.3.15-MariaDB-1 Debian 10
For my version I was able to set the password the following way:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY "your-password"; mysql> FLUSH PRIVILEGES;
This might not work with MariaDB >10.4. But give this a try: https://www.reddit.com/r/sysadmin/comments/avx1u6/how_to_change_the_root_password_with_mariadb_104/
-
That command worked. Installed db and can get into interface, will let you know it I can image soon. Thanks for the help, Moe.
-
@MTrejo2019 Which one’s that? The
GRANT ACCESS ...
? Wouldn’t have expected that. -
Boot to network and get I get asked for TFTP server. I can enter the server ip and it continues. I am using ISC DHCPd version 4.4.1.
-
@MTrejo2019 Please open a new topic on this fresh issue. People will find answers more easily if we don’t discus several issues in one thread.
Let us know if you manually installed and configured the DHCP server as well. Post config in the new topic.
-
Ok I will, ya the grant access one worked. this one:
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@‘localhost’ IDENTIFIED BY “your-password”;
mysql> FLUSH PRIVILEGES; -
Make as solved please, I can image. Thank you for the help.