Error: unable to save options to database: Unknown MySQL Ser

Support and queries relating to all previous versions of ZoneMinder
Locked
linh
Posts: 15
Joined: Thu Apr 08, 2004 8:42 pm

Error: unable to save options to database: Unknown MySQL Ser

Post by linh »

my hostname is redhat9
I ran perl zmconfig.pl -noi and got an error message below

[root@redhat9 zm-1.19.1]# perl zmconfig.pl -noi

Loading config from 'zmconfig.txt'
Loading config from DB
DBI connect('database=zm;host=redhat9','select, insert, update, delete',...) failed: Unknown MySQL Server Host 'redhat9' (1) at zmconfig.pl line 1476
Error: unable to load options from database: Unknown MySQL Server Host 'redhat9' (1)
Saving config to 'zmconfig.txt'
Saving config to DB
DBI connect('database=zm;hostredhat9','select, insert, update, delete',...) failed: Unknown MySQL Server Host 'hostredhat9' (1) at zmconfig.pl line 1380
Error: unable to save options to database: Unknown MySQL Server Host 'hostredhat9' (1)
Generating 'src/zm_config_defines.h'
Processing 'src/zm_config.h'
Processing 'web/zm_config.php'
Processing 'scripts/zmdc.pl'
Processing 'scripts/zmwatch.pl'
Processing 'scripts/zmaudit.pl'
Processing 'scripts/zmfilter.pl'
Processing 'scripts/zmx10.pl'
Processing 'scripts/zmpkg.pl'
Processing 'scripts/zmupdate.pl'
Processing 'scripts/zmvideo.pl'
Processing 'scripts/zm'
Processing 'db/zmschema.sql'

[root@redhat9 zm-1.19.1]#
=====================================================
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Error: unable to save options to database: Unknown MySQL

Post by zoneminder »

Hi,

I think there is something rather screwed up in your database. You should check that the values you gave for your database host, username and passwords all work if you use them from the command line, e.g.

<i>mysql <database> -u<username> -p<password> -h<hostname></i>

if not then you should check that your database and user is correctly configured.

It is also a little odd that in the first error the database host is reported as 'redhat9' and then later as 'hostredhat9'. It is also strange that the username appears to be 'select, insert, update, delete' so I would suspect your grant statement to create the user might have been incorrect also.

Phil,
Locked