Prefix for database

2 posts / 0 new
Last post
YL3AMS
Prefix for database

Hi!
I order hosting in GoDaddy service for my CQRLOG mysql. After i tray make database, but get error that i cannot connect cqrlog_common database.. I start digging and looks like this service is dedicated, and someone use database called cqrlog_common :) So only way to fix this is put prefix before database... so question - there is possibility put prefix before databases?

oh1kh
Prefix for database

Hi !
As the database name says this database is common for all cqrlogXXX log databases.

I do not get the idea what you are trying, but guess that you would set up an external internet based database that cqrlog should use. It should not need any special database creation manually.

Am I right?

You just give enough rights for the user you use for cqrlog database connection so that it can create,delete and use database.
Log in to your external database as administrator and give command:

GRANT ALL PRIVILEGES ON *.* TO 'cqrlog'@'%' IDENTIFIED BY 'cqrlog';

Change user "cqrlog" and password "cqrlog" ones you want to use.
Note that that this will give full rights to do ANYTHING on this database server. You can start with that, but I suggest you limit user rights if you are using database server also for other databases as cqrlog. If cqrlog is the only usage then this is ok.

When rights are set cqrlog can create all needed databases by itself.

That may cause problems if you mysql database server provider wants you to use databases that are prefixed by your user account name. I have one system that I maintain and that service provider wants every database name to start as "username_".

If that is the case you have to change the cqrlog source so that it uses database names you need. But that needs quite a lot job with testing that all will work as should.

Perhaps hire of virtual linux server would be easier. Then you can do anything you want with it.

--
Saku
OH1KH