Debian Wheezy amd64 install - ERROR 1142 (42000)
Posted: Sat Feb 06, 2016 1:51 am
Hi,
I'm slowly working my way through a debian wheezy amd64 install of zoneminder_1.28.0-wheezy_amd64.deb. I've been following the directions on github (same as wiki install).
I have an issue with mysql rights listed below:
-----------------------------------------------------------------------------------
dpkg -i /root/zoneminder_1.28.0-wheezy_amd64.deb; apt-get install -f;
Initiating database upgrade to version 1.29.0 from version 1.28.1
Upgrading database to version 1.29.0
Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
ERROR 1142 (42000) at line 393: CREATE command denied to user 'zmuser'@'localhost' for table 'Servers'
Output: Column Id exists in States
Column Id exists in States
Column IsActive exists in States
Column IsActive exists in States
Command 'mysql -hlocalhost -uzmuser -pzmpass zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql' exited with status: 1
dpkg: error processing zoneminder (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
--------------------------------------------------------------------------------
This seems like I have a 'rights' issue for the user zmuser to to access the mysql database, but i haven't been able to get around it:-(
Here's some of the things I've tried:
EDIT FILES LISTED in the UBUNTU install STEP 8 here: http://zoneminder.readthedocs.org/en/la ... buntu.html
If you have, go to zoneminder/www/api/app/Config & Edit database.php
There is a class there called DATABASE_CONFIG - change the $default array to reflect your new details. Example:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'mynewDBusername',
'password' => 'mynewDBpassword'
'database' => 'zm',
'prefix' => '',
//'encoding' => 'utf8',
);
I found 'different' files in the web folder (not www), but I couldn't edit them (as root). At least I tried a gedit database.php.'something here forgot it'
mysql> SELECT USER(),CURRENT_USER();
+----------------+----------------+
| USER() | CURRENT_USER() |
+----------------+----------------+
| root@localhost | root@localhost |
+----------------+----------------+
1 row in set (0.55 sec)
mysql> SOURCE share/mysql_fix_privilege_tables.sql
ERROR:
Failed to open file 'share/mysql_fix_privilege_tables.sql', error: 2
mysql> mysql_fix_privilege_tables.sql
->
-> exit
-> q
-> quit
-> ls
-> ^CCtrl-C -- exit!
Aborted
Does anyone have a suggestion that would help me get past this?
Thanks - Mark
I'm slowly working my way through a debian wheezy amd64 install of zoneminder_1.28.0-wheezy_amd64.deb. I've been following the directions on github (same as wiki install).
I have an issue with mysql rights listed below:
-----------------------------------------------------------------------------------
dpkg -i /root/zoneminder_1.28.0-wheezy_amd64.deb; apt-get install -f;
Initiating database upgrade to version 1.29.0 from version 1.28.1
Upgrading database to version 1.29.0
Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
ERROR 1142 (42000) at line 393: CREATE command denied to user 'zmuser'@'localhost' for table 'Servers'
Output: Column Id exists in States
Column Id exists in States
Column IsActive exists in States
Column IsActive exists in States
Command 'mysql -hlocalhost -uzmuser -pzmpass zm < /usr/share/zoneminder/db/zm_update-1.28.99.sql' exited with status: 1
dpkg: error processing zoneminder (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
--------------------------------------------------------------------------------
This seems like I have a 'rights' issue for the user zmuser to to access the mysql database, but i haven't been able to get around it:-(
Here's some of the things I've tried:
EDIT FILES LISTED in the UBUNTU install STEP 8 here: http://zoneminder.readthedocs.org/en/la ... buntu.html
If you have, go to zoneminder/www/api/app/Config & Edit database.php
There is a class there called DATABASE_CONFIG - change the $default array to reflect your new details. Example:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'mynewDBusername',
'password' => 'mynewDBpassword'
'database' => 'zm',
'prefix' => '',
//'encoding' => 'utf8',
);
I found 'different' files in the web folder (not www), but I couldn't edit them (as root). At least I tried a gedit database.php.'something here forgot it'
mysql> SELECT USER(),CURRENT_USER();
+----------------+----------------+
| USER() | CURRENT_USER() |
+----------------+----------------+
| root@localhost | root@localhost |
+----------------+----------------+
1 row in set (0.55 sec)
mysql> SOURCE share/mysql_fix_privilege_tables.sql
ERROR:
Failed to open file 'share/mysql_fix_privilege_tables.sql', error: 2
mysql> mysql_fix_privilege_tables.sql
->
-> exit
-> q
-> quit
-> ls
-> ^CCtrl-C -- exit!
Aborted
Does anyone have a suggestion that would help me get past this?
Thanks - Mark