Issue with installation script

Started by tastychicken1024, June 01, 2023, 01:13:30 PM

Previous topic - Next topic

tastychicken1024

I'm trying to set up Simple Machines Forum on Debian 11 running Nginx stable release, php 7.4, and MySQL latest version. Server is running on a VPS, not using any GUI tools to configure databases, cPanel etc etc etc...

When I reach step 3 to configure database settings and I press ok to advance to the next step, it redirects me to the first step again and won't connect to the database. It does this over and over.

My username and password are correct for the MySQL user account, the server is running on port 3306 and have tried both default and manually specifying 3306 (neither work), I have tried to manually create the database too to no avail by specifying its name, this does not work either.

I've been trying for hours and haven't gotten any further with this issue at present. I am really not too sure what else to do, I have not written any PHP before and I would just like to get my forum set up  :'(

Any help is appreciated!

Kindred

well, the obvious answer is that the connection details are NOT actually correct for the instance you are using...

This is the point where I would normally say "check with your host ..."

You need to
1- have a database CREATED and AVAILABLE (generally, empty is best)
1a- Tell the installer the correct database, path and connection/port to the database
2- Have a database user set up with the correct permissions
2a- Tell the installer that username and password
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

tastychicken1024

Quote from: Kindred on June 01, 2023, 03:05:22 PMwell, the obvious answer is that the connection details are NOT actually correct for the instance you are using...

This is the point where I would normally say "check with your host ..."

You need to
1- have a database CREATED and AVAILABLE (generally, empty is best)
1a- Tell the installer the correct database, path and connection/port to the database
2- Have a database user set up with the correct permissions
2a- Tell the installer that username and password

Hi, thanks for reply.

I have confirmed all of this and it still does not work. Like I stated, I created database, separate user inside database for using the db with relevant sql execution permissions, etcetera. I have told the installer all of the relevant details and it still does not work.

Any other ideas?

Sesquipedalian

Does the operating system user account that runs the web server also have the necessary permissions to access MySQL?

Generally speaking, the web server is usually run by a dedicated account (often named something like "_www"), rather than by the user account that you yourself log into when you SSH to the server. Even if your own account has access to MySQL, that doesn't mean that the web server account does. If it doesn't, you will need to fix that.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

tastychicken1024

Quote from: Sesquipedalian on June 02, 2023, 11:24:22 AMDoes the operating system user account that runs the web server also have the necessary permissions to access MySQL?

Generally speaking, the web server is usually run by a dedicated account (often named something like "_www"), rather than by the user account that you yourself log into when you SSH to the server. Even if your own account has access to MySQL, that doesn't mean that the web server account does. If it doesn't, you will need to fix that.

It should. It's hosted under the root account (for testing purposes, was just trying to see if I could set a forum up then I'd go back and set something more solid up under a normal user later on, but even at that, the root account should have no issues with permissions whatsoever.

Doug Heffernan

Quote from: tastychicken1024 on June 01, 2023, 01:13:30 PMWhen I reach step 3 to configure database settings and I press ok to advance to the next step, it redirects me to the first step again and won't connect to the database. It does this over and over.

Is there any error message shown at all?

tastychicken1024

Quote from: Doug Heffernan on June 02, 2023, 03:56:51 PM
Quote from: tastychicken1024 on June 01, 2023, 01:13:30 PMWhen I reach step 3 to configure database settings and I press ok to advance to the next step, it redirects me to the first step again and won't connect to the database. It does this over and over.

Is there any error message shown at all?

Nope. Just skips back to the very first step of the install process. No logs shown or anything. If there's a location of a log file which SMF writes to, It may be useful.

W2NAP

are you running MySQL or the MariaDB found in the debian repo?

My setup is debian 11 w/ Apache2/php/mariadb

something to try is phpmyadmin
apt install phpmyadmin
debian install will set the url for phpmyadmin as url-or-serverip/phpmyadmin you will have to set up phpmyadmin /tmp folder and blowfish secret so you don't get a ton of warn in the error.log about it not being set up.

I set up sql db/dbuser/pass via phpmyadmin and have no issues with smf and mariadb/sql

tastychicken1024

Quote from: W2NAP on June 02, 2023, 05:21:37 PMare you running MySQL or the MariaDB found in the debian repo?

My setup is debian 11 w/ Apache2/php/mariadb

something to try is phpmyadmin
apt install phpmyadmin
debian install will set the url for phpmyadmin as url-or-serverip/phpmyadmin you will have to set up phpmyadmin /tmp folder and blowfish secret so you don't get a ton of warn in the error.log about it not being set up.

I set up sql db/dbuser/pass via phpmyadmin and have no issues with smf and mariadb/sql

Honestly, I'd prefer to set it up with minimal overhead so making use of a frontend like phpmyadmin isn't really something I want to look in to.

My entire setup just consists of headless Debian 11, MySQL built from source, Nginx from apt + php7.4-fpm to provide PHP FastCGI and that's about it. I'd like to be able to set this up without much else in the way of software packages if possible...

Aleksi "Lex" Kilpinen

I've installed SMF multiple times (for testing purposes) on a headless Debian 11, and haven't had any issues. How exactly did you install MySQL/MariaDB? What were the exact steps? Did you run mysql_secure_installation?

Also, PHPMyAdmin is a PHP script, no additional overhead whatsoever.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

live627

Quote from: tastychicken1024 on June 01, 2023, 01:13:30 PMMy username and password are correct for the MySQL user account, the server is running on port 3306 and have tried both default and manually specifying 3306 (neither work), I have tried to manually create the database too to no avail by specifying its name, this does not work either.
perhaps you could write a small php script that simply attempts to connect to the database server using the mysqli driver (not pdo; smf doesn't use pdo)

Advertisement: