Skip to main content


@Friendica Support

Is there a way to do some kind of general recheck of the settings inside the DB or something like that?

This server was hosted at a BETA testing.
In the local.config.php there was apparently a wrong setting:
'hostname' => 'subdomain.oldhosting.com:3306',<-- WRONG SETTING AT OLD PROVIDER!!!
'hostname' => 'localhost',<-- Correct setting!

Different things on that installation didn't work, like posting to the helpers forum, a 500 error showed up.

There are several bugs I encounter that don't look to me like "normal" in the sense that they should have been noticed and fixed by the community in any case already.

So now I wonder if there is some routine I can execute that checks settings that could have been set wrongly, be it by the error described above or other problems.

in reply to Hypolite Petovan

@Hypolite Petovan
He is talking about the database. So if this is on the same machine localhost is okay.

'database' => [
                'hostname' => '127.0.0.1',
in reply to tom s

@tom s Ah, thanks. If the database credentials are invalid, no page should load. If they are valid but incorrect after a file move, there’s no way we can detect this. 🤔

Friendica Support reshared this.

in reply to Hypolite Petovan

@Hypolite Petovan What, no way to detect? Sorry, find out if you can reach your database server and the correct database is the minimum for admins of friendica.
in reply to tom s

@tom s What constitutes your "correct" database between two equally valid database credentials is up to the administrator, we can't make this choice for you.

Friendica Support reshared this.

in reply to Hypolite Petovan

Not sure why @tom s comment doesn't show up in my stream but I saw it from another profile.

Sorry for the incomplete description, somehow I guessed that it was obvious, my fault:

return [
	'database' => [
                [s]'hostname' => 'subdomain.oldhosting.com:3306',<-- WRONG SETTING AT OLD PROVIDER!!![/s]
		'hostname' => 'localhost',
		'username' => 'mysqlusername',
		'password' => 'mysqlpassword',
		'database' => 'mysqldatabasename',
		'charset' => 'utf8mb4',
	],

@Hypolite Petovan
Because of having problems with the installation/migration of the server:
Apache error message:
"Apache could not reliably determine the server's fully qualified domain name, using 127.0.1.1"

I edited
sudo nano /etc/hosts
and
sudo nano /etc/hostname
replacing
ubuntu
with
tupambae.org

reference:
squeet.me/display/962c3e10-956…

Do you consider that could have something to do with eventual problems and that using '127.0.0.1' instead of 'localhost' could fix that?


@Hank G ☑️

solved the "Apache could not reliably determine the server's fully qualified domain name, using 127.0.1.1" problem by editing:

sudo nano /etc/hosts
and
sudo nano /etc/hostname

replacing
ubuntu
with
yourfriendicadomain.com


in reply to TupambAdmin [stable]

it is not really a good idea, to give 127.0.0.1 an other name than localhost in /etc/hosts.
Put/change ServerName in apache2.conf or simply just ignore this Start-Warning, when your virtualhost for friendica is correct.
in reply to tom s

@Hypolite Petovan @tom s @silverwizard

Due to problems in the migration installation I edited:
/etc/hosts
and
/etc/hostname
by hand.
You find the complete content of those in the spoilers.

The change from 'localhost' to '127.0.0.1' as mentioned above in local.config.php has been done when the comment was posted.

I can't find any difference in the mayor behavior of the site as of now.

/etc/hosts# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 tupambae.org tupambae
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/hostnametupambae.org

/config/local.config.phpreturn [
'database' => [
'hostname' => '127.0.0.1',
'username' => 'friendicaDBuser',
'password' => '¡uhh .. y nearly posted it again!',
gif3986472
'database' => 'friendicaDB',
'charset' => 'utf8mb4',
],


I have posted a php.error.log on a newer help request, I just cleaned out the repititions in the php.error.log file to be able to only see the frequence the error comes up:

php.error.log[08-Nov-202323:14:23UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:33UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:37UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:38UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:42UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:49UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:15:51UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:16:32UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[08-Nov-202323:16:40UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[09-Nov-202308:28:21UTC]PHPDeprecated:Usingphp-function"is_string"asamodifierisdeprecatedandwillberemovedinafuturerelease.UseSmarty::registerPlugintoexplicitlyregisteracustommodifier.in/var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.phponline114
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:29UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191
[14-Nov-202314:15:30UTC]PHPFatalerror:Uncaughtmysqli_sql_exception:Connectionrefusedin/var/www/html/src/Database/Database.php:191
Stacktrace:
thrownin/var/www/html/src/Database/Database.phponline191


The following line shows up only once:
[09-Nov-202308:28:21UTC]PHPDeprecated:Usingphp-function"is_string"asamodifierisdeprecatedandwillberemovedinafuturerelease.UseSmarty::registerPlugintoexplicitlyregisteracustommodifier.in/var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.phponline114


PHP error log thrown in /src/Database/Database.php on line 191


@Friendica Support

#bugResearch

hi there, I have this message in my php.error.log

what should I do?

I didn't have a look at gitHub

php.error.log Database.php on line 191thrown in /var/www/html/src/Database/Database.php on line 191
[14-Nov-2023 14:15:30 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/html/src/Database/Database.php:191
Stack trace:
#0 /var/www/html/src/Database/Database.php(191): mysqli->__construct()
#1 /var/www/html/src/Database/Database.php(97): Friendica\Database\Database->connect()
#2 [internal function]: Friendica\Database\Database->__construct()
#3 /var/www/html/vendor/level-2/dice/Dice.php(132): ReflectionMethod->invokeArgs()
#4 /var/www/html/vendor/level-2/dice/Dice.php(96): Dice\Dice->Dice\{closure}()
#5 /var/www/html/src/DI.php(98): Dice\Dice->create()
#6 /var/www/html/src/DI.php(66): Friendica\DI::dba()
#7 /var/www/html/src/DI.php(54): Friendica\DI::setCompositeRootDependencyByHand()
#8 /var/www/html/index.php(35): Friendica\DI::init()
#9 {main}
thrown in /var/www/html/src/Database/Database.php on line 191

Platform Info: 2023.05 - stableFriendica Version: 2023.05 - stable
Friendica Source: gitHub
PHP version: 8.1.2-1ubuntu2.14
SQL version: MySQL / MariaDB
memory_limit 256M
4 Core CPU, 8 GB Ram with 300GB NVME Disk

Friendica Support reshared this.

in reply to utopiArte

silverwizard in the other help request wrote:

yeah - if the user is allowed access from only subdomain.oldhosting.com in mysql (check the users table) then you wont have access and your connection will be refused

How do I do that via SSH?

How would I run a command via SSH that checks all settings that could involve that issue?
@Tutorial

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan So if you do:

mysql -u root -p mysql
select * from user

You should get the user table for mysql, and then you should get a host - you should make sure that the host in /config/local.config.php matches that host

But yes - the core issue is that your mysql DB isn't being connected to and is refusing connections.

Friendica Support reshared this.

in reply to silverwizard

I managed to make it to the following but "nothing happens":

rootname@VPShosting:~# mysql friendicaDB
MariaDB [friendicaDB]> -u friendicaDBuser -pPASSWORD
    -> select * from user
    -> tutorial
(that didn't work out)
    -> select * from user tutorial
(that didn't work out neither)
    -> select * from tutorial
(nothing)
    ->

🤔

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @silverwizard @tom s You didn’t follow the original mysql command that uses the mysql database. Additionally, each SQL query must be terminated by a semi-colon to be executed, otherwise it just adds a new line to the current query.

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan

$ mysql -u root -p mysql                                                                                                                           
Enter password:                                                                                                                                                                                                                                                                                    
Welcome to the MariaDB monitor.  Commands end with ; or \g.                                                                                        
Your MariaDB connection id is 3477864                                                                                                              

MariaDB [mysql]> select * from user;                                                                                                               
+-----------+-------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+------
-----+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------
+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------
------+--------------------+------------------+------------+--------------+------------------------+---------------------+----------+------------+-
------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+------------------------
-------------------+------------------+---------+--------------+--------------------+
| Host      | User        | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | Delete_history_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin                | authentication_string                     | password_expired | is_role | default_role | max_statement_time |

you gotta use a user with access to the users table (probably root) and look at how they are allowed access.

Lots of people set users up with access from % or localhost - but if you were using an external domain, if you added the domain under the host option then you need to give access from localhost. This is because mysql users have a HOST setting (see in schema above). This is the most likely reason, otherwise it could be wrong password or something else.

Your issue is definitely with your MySQL connection though.

Friendica Support reshared this.

in reply to silverwizard

To begin with I run into trouble with the root password for mysql, the general setup of this ubuntu server is described here:
tupambae.org/display/e65e1095-…

the specific setup of apache/mysql as part of the installation here:
tupambae.org/display/0ac89072-…

In other words, I log onto the VPS with puTTy keys and am root from there.

What I posted above was my intent to do the command posted by silverwizard as the DB user as that's the only thing I can imagine to do as I'm not aware of any root user password I do have for this.

The command I tried now was the following but I get rejected.
I just changed the password again to make sure that I'm using the right one for this DB:

root@tupambae:~# mysql -u friendicaDBuser -p mysql                                                                 
Enter password:                                                                                                   
ERROR 1044 (42000): Access denied for user 'friendicaDBuser'@'localhost' to database 'mysql'

I went back to logging first into the specific DB.
Than:
MariaDB [friendicaDB]> select * from user;
adding the semicolon as Hypolite pointed out.

I get a ton of lines, than:

Click to open/close| uid | parent-uid | guid | username | password | legacy_password | nickname | email | openid | timezone | language | register_date | login_date | last-activity | default-location | allow_location | theme | pubkey | prvkey | spubkey | sprvkey | verified | blocked | blockwall | hidewall | blocktags | unkmail | cntunkmail | notify-flags | page-flags | account-type | prvnets | pwdreset | pwdreset_time | maxreq | expire | account_removed | account_expired | account_expires_on | expire_notification_sent | def_gid | allow_cid | allow_gid | deny_cid | deny_gid | openidserver |

than public and privat keys and then the respective data apparently about every user.

This is what I get about the user:

tutorial-----END PRIVATE KEY-----
| 1 | 0 | 1 | 0 | 1 | 0 | 10 | 65535 | 0 | 0 | 0 | NULL | NULL | 10 | 0 | 0 | 0 | 0001-01-01 00:00:00 | 0001-01-01 00:00:00 | 31 | | | | | NULL |
| 28 | 11 | 0acSOME2-ANY-4cad-c372-12THING6 | Tutorial | $2y$10-AllKindsOfLettersAndNumbers-7AO/mS | 0 | tutorial | emailusername@email.com | | UTC | en-gb | 2023-11-09 10:00:35 | 2023-11-23 13:57:20 | 2023-11-23 | | 0 | frio | -----BEGIN PUBLIC KEY-----

and now?


I don't know how my blog post got sucked into all this but I agree if you are setting up a complex setup don't use it. You shouldn't be doing that as a newbie anyway. That wasn't the intended audience of my content. I don't appreciate you all trashing it in general. Excise links to my stuff from this so that I don't have to see your shit any longer. Thanks.

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan Yeah - that's the user table for the friendica database, not the mysql database.

If you are on Ubuntu, you should be able to run

sudo mysql mysql

And that should connect you to the mysql database as the root user.

Basically - we are looking at the DB itself, and not the friendica DB. As far as errors posted, Friendica is working fine.

Friendica Support reshared this.

in reply to utopiArte

If I compare what silverwizard posted to the print I get, they are anything but the same:

silverwizard
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | Delete_history_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | is_role | default_role | max_statement_time |

mine (friendica 2023.05)
| uid | parent-uid | guid | username | password | legacy_password | nickname | email | openid | timezone | language | register_date | login_date | last-activity | default-location | allow_location | theme | pubkey | prvkey | spubkey | sprvkey | verified | blocked | blockwall | hidewall | blocktags | unkmail | cntunkmail | notify-flags | page-flags | account-type | prvnets | pwdreset | pwdreset_time | maxreq | expire | account_removed | account_expired | account_expires_on | expire_notification_sent | def_gid | allow_cid | allow_gid | deny_cid | deny_gid | openidserver |

🤔

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan Yeah, because mine is the user table in the mysql DB, vs yours being the user table in the friendica DB

Friendica Support reshared this.

in reply to silverwizard

rootname@VPShosting:~# sudo mysql mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 40431
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [mysql]> select * from user;
+-----------+----------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+---------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-------------------------------------------+------------------+---------+--------------+--------------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | Delete_history_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string | password_expired | is_role | default_role | max_statement_time |
+-----------+----------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+---------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-------------------------------------------+------------------+---------+--------------+--------------------+
| localhost | mariadb.sys | | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | | Y | N | | 0.000000 |
| localhost | root | invalid | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | invalid | N | N | | 0.000000 |
| localhost | mysql | invalid | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 | mysql_native_password | invalid | N | N | | 0.000000 |
| localhost | friendicaUser | *F0somemaybeimportantpassword12E | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | mysql_native_password | *F0somemaybeimportantpassword12E | N | N | | 0.000000 |
+-----------+----------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+---------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+-----------------------+-------------------------------------------+------------------+---------+--------------+--------------------+
5 rows in set (0.001 sec)

Friendica Support reshared this.

in reply to utopiArte

resuming:

The setting

'database' =>[
		'hostname' => 'localhost',
	],

or
'database' =>[
		'hostname' => '127.0.0.1',
	],

don't change the behaviour of the site and work (more or less).

As shown in the spoiler above sudo mysql mysql shows for the mariaDB:
| localhost |

/etc/hosts

127.0.1.1 tupambae.org tupambae
127.0.0.1 localhost

/etc/hostname
tupambae.org

So if I understand this correct all these settings are ok.

Yet the site doesn't work for specific profiles like the forum pages created by this profile or some other issues.

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan Ok - so that's the obvious reason where it might go wrong. And you can confirm that the mysql service is listening? Does:
mysql -u friendicaUser -p -h localhost --protocol=TCP
work?

But generally - it could be a password issue or it could be username issue, or it could be something else, I don't know. But that's definitely the correct user in the DB.

Friendica Support reshared this.

in reply to silverwizard

> friendicaUser

is referring to the friendica user in question, for example the profile "Tutorial" of this site, or the username for the friendicaDB:

'database' =>[
		'username' => 'mysqlusername',
	],

?

This entry was edited (1 year ago)

Friendica Support reshared this.

in reply to silverwizard

I tried:
mysql -u mysqlusername -p -h localhost --protocol=TCP
"mysqlusername" as defined in the local.config.php

I don't get any result at all, not even an error message. The console simply displays the mysql welcom message and goes to the prompt:
MariaDB [(none)]>

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan ok - so TCP is working. Not having a password prompt seems odd. Something is going on - but no more I can tell you

Friendica Support reshared this.

in reply to silverwizard

> i'm unsure of your setup

As a learning question, what do you mean by that?
What setups are their, are you used to or do you envision?

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan
so, your SQL server has users and DBs and a location. You asked about which password and which user - and I don't know. When you made your DB it sounds like you made a few users and a few DBs, but I don't know which one is correct. You're saying something about a tutorial user or DB which would be a thing you setup and I don't know how it relates.

Friendica Support reshared this.

in reply to silverwizard

Yeah that's about the main misunderstanding in my head.

There is:

  • The VPS user (like root)
  • The mysql user (like mysqlRoot(?) or friendicaDBuser -> 'username' => 'mysqlusername',)
  • The friendica site user ((like "tutorial" -> @Tutorial (that has problems that might be issues or even just friendica specific behaviors of a profile I didn't get as of now)

I guess your head simply slipped into mysql mode and talks from there while mine watches from the friendica user, goes to the VPS user and than wonders if you are talking about mysql specific things.

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan So you are debugging mysql because the error is a mysql one, everything else is completely unrelated

If you have 'username' => 'mysqlusername' in your config files that's your issue, because the mysql user is friendicaDBuser. You gotta fill in the local config with your values.

Friendica Support reshared this.

in reply to silverwizard

> So you are debugging mysql because the error is a mysql one, everything else is completely unrelated

ok's

I guess my "point" was that there could be something wrong in the specific mysql data of the user "tutorial".
>> "Yeah, because mine is the user table in the mysql DB, vs yours being the user table in the friendica DB"


> If you have 'username' => 'mysqlusername' in your config files that's your issue, because the mysql user is friendicaDBuser. You gotta fill in the local config with your values.

These (mysqlusername/friendicaDBuser) are only "Terms", place holders.

The settings data base name, data base user and password in the local.config.php are correct as for what I have seen for now. The only particularity is that data base name and data base user name are the same, that is a setting the previous BETA testing hoster had setup and I didn't changed that in the first place to not create problems.

The previous server was some kind of "apps" or SNAP setup (or "whatever"):

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @tom s @Hypolite Petovan ok, but make sure they are correct
in this case, *no*, it's not an issue with the user. The initial connection is refused.

It looks like your mysql db user is "friendicaUser"? Is that correct?

Friendica Support reshared this.

in reply to silverwizard

Checked the DB name, DB user name and password and everything is correct.

Friendica Support reshared this.

in reply to utopiArte

@utopiArte @silverwizard @tom s Top: mysql.user. Bottom: friendicaDB.user

Both tables are named the same, but they aren’t part of the same schema.

Friendica Support reshared this.

in reply to utopiArte

Update on the php error log:

PHP error messages mentioned above:
thrown in/var/www/html/src/Database/Database.phponline191
only appears for two days and was printed several times.

This line (still) was printed only once:
[09-Nov-202308:28:21UTC]PHPDeprecated:Usingphp-function"is_string"asamodifierisdeprecatedandwillberemovedinafuturerelease.UseSmarty::registerPlugintoexplicitlyregisteracustommodifier.in/var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.phponline114

Now there is a new one that might have come up because I just made an update/upgrade of the Ubuntu server and it looks like the time stamp UTC could be from that moment:

[25-Nov-2023 13:04:27 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to all>

Friendica Support reshared this.