Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection problem when migrating database from MariaDB(5.x) to MariaDB10 #917

Closed
2 of 3 tasks
mark-sugus opened this issue May 1, 2020 · 2 comments
Closed
2 of 3 tasks

Comments

@mark-sugus
Copy link

mark-sugus commented May 1, 2020

Baikal version: 0.2.6

  • I have searched open and closed issues for duplicates
  • I have installed the release zip, not the source code zip
  • I have moved the whole, untouched Specific folder to the new installation

Problem:
On my Synology NAS I have migrated my Baikal database from MariaDB5 to MariaDB10. I can connecting with myphpAdmin to the MariaDB10 database and see all the tables belonging to Baikal. However if want to access the Baikal admin page a get the message:

exception 'Exception' with message 'Fatal error: no connection to a database is available.' in /volume1/web/baikal.app/Core/Frameworks/Baikal/Core/Tools.php:66
Stack trace:
#0 /volume1/web/baikal.app/Core/Frameworks/Baikal/Framework.php(79): Baikal\Core\Tools::assertBaikalIsOk()
#1 /volume1/web/baikal.app/Core/Frameworks/BaikalAdmin/Framework.php(34): Baikal\Framework::bootstrap()
#2 /volume1/web/baikal.app/admin/index.php(54): BaikalAdmin\Framework::bootstrap()
#3 {main}

I already changed the default Synology port number (3307) for MariaDB10 to the default MariaDB port number 3305 and my process information is showing this:

root     14184  0.0  0.0  11992  2944 ?        S    18:34   0:00 /bin/sh /usr/local/mariadb10/bin/mysqld_safe --datadir=/var/packages/MariaDB10/target/mysql --pid-file=/run/mysqld/mysqld10.pid
mysql    14486  0.0  0.5 1470748 54820 ?       Sl   18:34   0:00 /usr/local/mariadb10/bin/mysqld --basedir=/usr/local/mariadb10 --datadir=/var/packages/MariaDB10/target/mysql --plugin-dir=/usr/local/mariadb10/lib/mysql/plugin --user=mysql --log-error=/var/packages/MariaDB10/target/mysql/sugus.err --pid-file=/run/mysqld/mysqld10.pid --socket=/run/mysqld/mysqld10.sock --port=3306
root     21133  0.0  0.0  23148  2336 pts/19   S+   18:48   0:00 grep --color=auto mysql

I don't know how to resolve the issue. Any idea is very appreciated.

The main reason to migrate to MariaDB10 is that I would like to upgrade to the newer Baikal 0.6.x version. But before that my actual version should run with MariaDB10.
Thanks to all who are doing a great job in continuosly developing Baikal.

Mark

@ByteHamster
Copy link
Member

In that (ancient) version of Baikal, the check for the database connection is commented out for whatever reason. Maybe you can add something like echo $e->getMessage(); there to learn more details about why it fails.

try {
$GLOBALS["DB"] = new \Flake\Core\Database\Mysql(
PROJECT_DB_MYSQL_HOST,
PROJECT_DB_MYSQL_DBNAME,
PROJECT_DB_MYSQL_USERNAME,
PROJECT_DB_MYSQL_PASSWORD
);
# We now setup the connexion to use UTF8
$GLOBALS["DB"]->query("SET NAMES UTF8");
} catch(\Exception $e) {
#die("<h3>Baïkal was not able to establish a connexion to the configured MySQL database (as configured in Specific/config.system.php).</h3>");
}

@mark-sugus
Copy link
Author

mark-sugus commented May 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants