Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » How to consolidate all the Radicore databases into a single database
How to consolidate all the Radicore databases into a single database [message #7278] Mon, 25 February 2019 13:01 Go to next message
MattieValdez is currently offline  MattieValdez
Messages: 1
Registered: February 2019
Junior Member
How can I consolidate all the Radicore databases into a single database
Re: How to consolidate all the Radicore databases into a single database [message #7279 is a reply to message #7278] Mon, 25 February 2019 13:17 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2272
Registered: April 2006
Location: Surrey, UK
Senior Member
It is not acceptable to append a new question onto somebody else's thread, so I have split this off into its own thread.

To answer your question I suggest you read http://www.tonymarston.net/php-mysql/infrastructure-faq.html #faq150


Re: How to consolidate all the Radicore databases into a single database [message #7653 is a reply to message #7279] Wed, 15 September 2021 16:40 Go to previous messageGo to next message
PeterdePutter is currently offline  PeterdePutter
Messages: 4
Registered: September 2021
Location: Amersfoort
Junior Member
Hello,

Even after reading the aforementioned FAQ, and setting all values in config.inc, I still experience some problems...
The errorlog shows:

Fatal Error: MySQL: Access denied for user 'Peter'@'%' to database 'k1593_audit' (# 1044)
Error in line 113 of file '____/radicore/includes/dml.mysqli.class.inc'.

Please note the bold text, since that should be (according to config.inc):
$servers[0]['switch_dbnames'] = array('audit' => 'single'

In MySQL, the database k1593_single does exist..
Probably just missing something, plze assist...
Re: How to consolidate all the Radicore databases into a single database [message #7654 is a reply to message #7653] Thu, 16 September 2021 04:35 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2272
Registered: April 2006
Location: Surrey, UK
Senior Member
Can you send me a copy of your config.inc file so I can see what values you have defined?

Re: How to consolidate all the Radicore databases into a single database [message #7655 is a reply to message #7654] Fri, 17 September 2021 17:45 Go to previous messageGo to next message
PeterdePutter is currently offline  PeterdePutter
Messages: 4
Registered: September 2021
Location: Amersfoort
Junior Member
Sure, the relevant items as follows:
Please note that name of the (single) database has changed into "auditgame".

$GLOBALS['dbms']   = 'mysql';      // database engine is MySQL
$GLOBALS['dbhost'] = 'localhost';
$GLOBALS['SERVER_NAME'] = 'localhost';

$GLOBALS['dbusername'] = 'Peter';
$GLOBALS['dbprefix']   = 'k1593_';
$GLOBALS['dbport']     = 3306;
$GLOBALS['dbsocket']   = null;

// this demonstrates the multi-server option (see FAQ92)
if (preg_match('/^(127.0.0.1|localhost|desktop|laptop)$/i', $_SERVER['SERVER_NAME'])) {
    global $servers;
    $servers[0]['dbhost']     = $dbhost;
    $servers[0]['dbengine']   = $dbms;
    $servers[0]['dbusername'] = $dbusername;
    $servers[0]['dbuserpass'] = $dbuserpass;
    $servers[0]['dbport']     = $dbport;
    $servers[0]['dbprefix']   = $dbprefix;

// these are the database names used in the Data Dictionary
    $servers[0]['dbnames']    = 'audit, dict, menu, workflow';
// these are the database names used on the server
    $servers[0]['switch_dbnames'] = array('audit' => 'auditgame',
					  'dict' => 'auditgame',
					  'menu' => 'auditgame',
					  'workflow' => 'auditgame');
Re: How to consolidate all the Radicore databases into a single database [message #7656 is a reply to message #7655] Sat, 18 September 2021 04:25 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2272
Registered: April 2006
Location: Surrey, UK
Senior Member
The reason that the framework is looking for a database with the prefix 'k1593_' is because you told it to. Your config file contains this at line 5:
$GLOBALS['dbprefix']   = 'k1593_';
and then this at line 16:
$servers[0]['dbprefix']   = $dbprefix;
If you dont want to use a prefix then line 16 should set it to empty.


Re: How to consolidate all the Radicore databases into a single database [message #7657 is a reply to message #7656] Sat, 18 September 2021 04:44 Go to previous messageGo to next message
PeterdePutter is currently offline  PeterdePutter
Messages: 4
Registered: September 2021
Location: Amersfoort
Junior Member
Tony,

Thanks for your reply. However, the problem is that the framework is looking for a database "k1593_audit" when it should be looking for the database "k1593_auditgame". The prefix is fine, since my ISP is forcing this on me... Confused

I'm still thinking i'm missing something simple...
Maybe the problem is, that i am dealing with a combination of a prefixed database and all databases consolidated in one?

Excuse my English grammar, since this is not my native language
Re: How to consolidate all the Radicore databases into a single database [message #7658 is a reply to message #7657] Sat, 18 September 2021 05:14 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2272
Registered: April 2006
Location: Surrey, UK
Senior Member
Look at the condition on line 9:
if (preg_match('/^(127.0.0.1|localhost|desktop|laptop)$/i', $_SERVER['SERVER_NAME'])) {
This will only set values in $servers[0] if that condition is met. That example was for my personal test environment, so you either need to to comment out this line OR change the server name.


Re: How to consolidate all the Radicore databases into a single database [message #7659 is a reply to message #7658] Sat, 18 September 2021 07:52 Go to previous message
PeterdePutter is currently offline  PeterdePutter
Messages: 4
Registered: September 2021
Location: Amersfoort
Junior Member
Thanks!
That works like a charm!
Previous Topic: Installation issue
Next Topic: V 2.19.0 - logon problem
Goto Forum:
  


Current Time: Tue Oct 19 06:56:49 EDT 2021

Total time taken to generate the page: 0.01026 seconds