[BlueOnyx:16419] Re: 5208R - Adding mysql Database to a site

Dirk Estenfeld dirk.estenfeld at bpanet.de
Thu Nov 6 02:18:13 -05 2014


Michael,

thank you very much for your email.
In Services -> Mysql settings I checked all checkboxes. Resource limits are all set to 0.

I changed the debug flag in the file /usr/sausalito/handlers/base/mysql/create_mysql_data.pl
And created a new site with a mysql database.

Here is the debug information:

Nov  6 08:05:42 servername cced(smd)[32057]: client 6:[49:7574]: SET  334 . MYSQL_Vsite "username" "=" "vsite_uBGeUik" "pass" "=" "QUkx4cx" "host" "=" "localhost" "hidden" "=" "1415257542" "DB" "=" "vsite_uBGeUik_db" "port" "=" "3306" "create" "=" "1415257542" "enabled" "=" "1"
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_object: HASH(0x1fafd70)
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_new: HASH(0x1fafd10)
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_old: HASH(0x1ce3b98)
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_oid: 334
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_is_create: 0
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_is_destroy: 0
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : event_is_modify: 1
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = {#012          'NAMESPACE' => '',#012          'dns_auto' => '0',#012          'hostname' => 'detest',#012          'domain' => 'detestdomain.de',#012          'webAliasRedirects' => '0',#012          'ipaddr' => '123.123.123.123',#012          'emailDisabled' => '0',#012          'CLASS' => 'Vsite',#012          'siteAdminCaps' => '',#012          'volume' => '/home',#012          'mailAliases' => '',#012          'name' => 'site16',#012          'maxusers' => '5',#012          'OID' => '334',#012          'userwebsDisabled' => '0',#012          'mailCatchAll' => '',#012          'basedir' => '/home/.sites/148/site16',#012          'fqdn' => 'detest.detestdomain.de',#012          'suspend' => '0',#012          'userPrefixEnabled' => '0',#012          'createdUser' => 'admin',#012          'webAliases' => '',#012          'site_preview' => '0',#012          'prefix' => '',#012          'userPrefixField' => '',#012          'CLASSVER' => '1.0'#012        };#012$VAR2 = {#012          'create' => '1415257542',#012          'pass' => 'QUkx4cx',#012          'DB' => 'vsite_uBGeUik_db',#012          'NAMESPACE' => 'MYSQL_Vsite',#012          'port' => '3306',#012          'username' => 'vsite_uBGeUik',#012          'host' => 'localhost',#012          'hidden' => '1415257542',#012          'destroy' => '1415257498',#012          'CLASSVER' => '1.0',#012          'enabled' => '1'#012        };#012$VAR3 = {};#012$VAR4 = {#012          'dns_auto' => '0',#012          'NAMESPACE' => '',#012          'hostname' => 'detest',#012          'domain' => 'detestdomain.de',#012          'webAliasRedirects' => '0',#012          'ipaddr' => '123.123.123.123',#012          'emailDisabled' => '0',#012          'CLASS' => 'Vsite',#012          'siteAdminCaps' => '',#012          'volume' => '/home',#012          'mailAliases' => '',#012          'name' => 'site16',#012          'maxusers' => '5',#012          'OID' => '334',#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : DB: vsite_uBGeUik_db
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : system_main[0]: 1
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : MySQLd status: RUNNING
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : User: vsite_uBGeUik - DB: vsite_uBGeUik_db
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : =================== Create db ==============
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : the_user_rights_count:15
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : my_user_rights:SELECT, INSERT, UPDATE, DELETE, FILE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 'localhost';#012$VAR2 = '3306';#012$VAR3 = 'root';#012$VAR4 = 'root-password';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 'CREATE DATABASE `vsite_uBGeUik_db`;#012';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 1;#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 'GRANT SELECT, INSERT, UPDATE, DELETE, FILE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON `vsite_uBGeUik_db`.* TO `vsite_uBGeUik`@`localhost`;#012';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = undef;#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 'GRANT USAGE ON * . * TO `vsite_uBGeUik`@`localhost` IDENTIFIED BY \'QUkx4cx\' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;#012';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = '0E0';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = 'FLUSH PRIVILEGES;#012';#012
Nov  6 08:05:42 servername pperld /usr/sausalito/handlers/base/mysql/create_mysql_data.pl: : Dumper: $VAR1 = '0E0';#012


Database is created
User is created

But User have no rights for its database:

Benutzer mit Zugriff auf "vsite_uBGeUik_db"  
root  127.0.0.1 global  ALL PRIVILEGES   Ja  Rechte ändern Rechte ändern 
root  localhost global  ALL PRIVILEGES   Ja  Rechte ändern Rechte ändern 
root  localhost.localdomain global  ALL PRIVILEGES   Ja  Rechte ändern Rechte ändern

Best regards,
Dirk


-----------------------------------------------
Black Point Arts Internet Solutions GmbH - Hanauer Landstrasse 423a - 60314 Frankfurt

-----------------------------------------------
-----Ursprüngliche Nachricht-----
Von: blueonyx-bounces at mail.blueonyx.it [mailto:blueonyx-bounces at mail.blueonyx.it] Im Auftrag von Michael Stauber
Gesendet: Donnerstag, 6. November 2014 00:54
An: BlueOnyx General Mailing List
Betreff: [BlueOnyx:16418] Re: 5208R - Adding mysql Database to a site

Hi Dirk,

> I click the button mysql. I use the default (random) information which is generated by the GUI.
> I klick Safe.
> -> Database is created 
> -> MySQL User is created
> BUT
> -> MySQL User have no access rights to the new database.
> I have to go to phpmyadmin and give priviledges for the new database to the new user.
> Did I miss something or might this be a bug?

Hmm. I just tried that and I cannot replicate the problem.

When you let the GUI create a MySQL Database and MySQL user for a Vsite,
it will grant the user the permissions that you specified under "Network
Services" / "MySQL Settings".

I just tested that again on a server of mine and it works as intended.

Please check the settings under "Network Services" / "MySQL Settings".

Also, you might want to edit this file:

/usr/sausalito/handlers/base/mysql/create_mysql_data.pl

At the top of it is this debugging switch:

# Debugging switch:
$DEBUG = "0";

Set it to "1", save the changes and try creating a MySQL database and
user again for another Vsite. Check /var/log/messages for the
transaction related to the MySQL database and user creation. With the
debugging turned on you can actually see what privileges the handler
sets while its doing its job.

-- 
With best regards

Michael Stauber
_______________________________________________
Blueonyx mailing list
Blueonyx at mail.blueonyx.it
http://mail.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list