Re: MySQL connection error after upgrade 4.9-5.0

2012-03-15 Thread Uwe Dippel
One more step towards OT, and yet on the spot. Now it is on 'beauty'.
At shutdown, we get always
stopping package daemons:/etc/rc[260]: /etc/rc.d/: cannot execute -
Is a directory

Is there anything wrong, still, with our configuration?

Uwe



MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Uwe Dippel
I have this unfortunate occurrence on one of my production machines:
Database Error: Unable to connect to the database:Could not connect to MySQL
I studied the Upgrade Guide 4.9 to 5.0 intensely before and after, but
can't find what went wrong. I just did the upgrade, and made the links
as proposed (so I hope)

# pwd
/etc/php-5.2
# ls -l
total 0
lrwxr-xr-x  1 root  wheel  26 Mar 14 17:26 gd.ini - /etc/php-5.2.sample/gd.ini
lrwxr-xr-x  1 root  wheel  29 Mar 14 17:25 mysql.ini -
/etc/php-5.2.sample/mysql.ini

# ls -l /var/www/conf/modules
total 0
lrwxr-xr-x  1 root  daemon  41 Mar 14 16:26 php.conf -
/var/www/conf/modules.sample/php-5.2.conf

I also tried to copy the modified php.ini from /var/www/conf to /etc/php-5.2.ini
Then the result is:
Database Error: Unable to connect to the database:The MySQL adapter
mysql is not available.

pkg_info looks okay:
mini_sendmail-chroot-1.3.6p1 static mini_sendmail for chrooted apache
mysql-client-5.1.54p0 multithreaded SQL database (client)
mysql-server-5.1.54p9 multithreaded SQL database (server)
nano-2.2.6  Pico editor clone with enhancements
[...]
pfstat-2.3p1packet filter statistics visualization
php-5.2.17p5server-side HTML-embedded scripting language
php-gd-5.2.17p4 image manipulation extensions for php5
php-mysql-5.2.17p3  mysql database access extensions for php5
png-1.5.4   library for manipulating PNG images

I am very grateful for any help or advice how to further debug this.

Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Fred Crowson
On 14 March 2012 09:53, Uwe Dippel udip...@gmail.com wrote:
 I have this unfortunate occurrence on one of my production machines:
 Database Error: Unable to connect to the database:Could not connect to
MySQL
 I studied the Upgrade Guide 4.9 to 5.0 intensely before and after, but
 can't find what went wrong. I just did the upgrade, and made the links
 as proposed (so I hope)

 # pwd
 /etc/php-5.2
 # ls -l
 total 0
 lrwxr-xr-x  1 root  wheel  26 Mar 14 17:26 gd.ini -
/etc/php-5.2.sample/gd.ini
 lrwxr-xr-x  1 root  wheel  29 Mar 14 17:25 mysql.ini -
 /etc/php-5.2.sample/mysql.ini

 # ls -l /var/www/conf/modules
 total 0
 lrwxr-xr-x  1 root  daemon  41 Mar 14 16:26 php.conf -
 /var/www/conf/modules.sample/php-5.2.conf

 I also tried to copy the modified php.ini from /var/www/conf to
/etc/php-5.2.ini
 Then the result is:
 Database Error: Unable to connect to the database:The MySQL adapter
 mysql is not available.

 pkg_info looks okay:
 mini_sendmail-chroot-1.3.6p1 static mini_sendmail for chrooted apache
 mysql-client-5.1.54p0 multithreaded SQL database (client)
 mysql-server-5.1.54p9 multithreaded SQL database (server)
 nano-2.2.6  Pico editor clone with enhancements
 [...]
 pfstat-2.3p1packet filter statistics visualization
 php-5.2.17p5server-side HTML-embedded scripting language
 php-gd-5.2.17p4 image manipulation extensions for php5
 php-mysql-5.2.17p3  mysql database access extensions for php5
 png-1.5.4   library for manipulating PNG images

 I am very grateful for any help or advice how to further debug this.

 Uwe


How did you start your mysql server?

What does your logs say in /var/mysql/ ?

hth

Fred



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Norman Golisz
Hi Uwe,

On Wed Mar 14 2012 17:53, Uwe Dippel wrote:
 I have this unfortunate occurrence on one of my production machines:
 Database Error: Unable to connect to the database:Could not connect to MySQL
 I studied the Upgrade Guide 4.9 to 5.0 intensely before and after, but
 can't find what went wrong. I just did the upgrade, and made the links
 as proposed (so I hope)
 
 # pwd
 /etc/php-5.2
 # ls -l
 total 0
 lrwxr-xr-x  1 root  wheel  26 Mar 14 17:26 gd.ini - 
 /etc/php-5.2.sample/gd.ini
 lrwxr-xr-x  1 root  wheel  29 Mar 14 17:25 mysql.ini -
 /etc/php-5.2.sample/mysql.ini
 
 # ls -l /var/www/conf/modules
 total 0
 lrwxr-xr-x  1 root  daemon  41 Mar 14 16:26 php.conf -
 /var/www/conf/modules.sample/php-5.2.conf
 
 I also tried to copy the modified php.ini from /var/www/conf to 
 /etc/php-5.2.ini
 Then the result is:
 Database Error: Unable to connect to the database:The MySQL adapter
 mysql is not available.

you need to create the directory /etc/php-5.2 and place equivalent symbolic 
links
to modules in /etc/php-5.2.sample as in /var/www/conf/php5.

From upgrade50.html:

 php module changes
 The various PHP modules (for example gd, mysql, postgresql, xcache, and 
 various
 other modules which are part of PHP or from PECL) had their configuration 
 files
 in /var/www/conf/php5.sample; symbolic links for active modules were placed in
 /var/www/conf/php5. These have moved to /etc/php-5.2.sample and /etc/php-5.2
 respectively. You will need to check for existing links in /var/www/conf/php5
 and create equivalent links in /etc/php-5.2. Note that mbstring is now part of
 the main php-5.2 package so an existing mbstring.ini symbolic link can be
 ignored.

Yours,
Norman



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Norman Golisz
On Wed Mar 14 2012 11:59, Norman Golisz wrote:
 Hi Uwe,
 
 On Wed Mar 14 2012 17:53, Uwe Dippel wrote:
  I have this unfortunate occurrence on one of my production machines:
  Database Error: Unable to connect to the database:Could not connect to 
  MySQL
  I studied the Upgrade Guide 4.9 to 5.0 intensely before and after, but
  can't find what went wrong. I just did the upgrade, and made the links
  as proposed (so I hope)
  
  # pwd
  /etc/php-5.2
  # ls -l
  total 0
  lrwxr-xr-x  1 root  wheel  26 Mar 14 17:26 gd.ini - 
  /etc/php-5.2.sample/gd.ini
  lrwxr-xr-x  1 root  wheel  29 Mar 14 17:25 mysql.ini -
  /etc/php-5.2.sample/mysql.ini
  
  # ls -l /var/www/conf/modules
  total 0
  lrwxr-xr-x  1 root  daemon  41 Mar 14 16:26 php.conf -
  /var/www/conf/modules.sample/php-5.2.conf
  
  I also tried to copy the modified php.ini from /var/www/conf to 
  /etc/php-5.2.ini
  Then the result is:
  Database Error: Unable to connect to the database:The MySQL adapter
  mysql is not available.
 
 you need to create the directory /etc/php-5.2 and place equivalent symbolic 
 links
 to modules in /etc/php-5.2.sample as in /var/www/conf/php5.

sorry, I failed to read your post properly. I'm ashamed. You did follow these 
steps,
obviously.

However, did you change any values in php.ini from default?



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Uwe Dippel
On Wed, Mar 14, 2012 at 7:27 PM, Norman Golisz li...@zcat.de wrote:

 However, did you change any values in php.ini from default?

no, not yet. I wasn't actually expecting everything to be up 100%, but
to be up, with the 50-default php-5.2.ini. Or, with the previous
php.ini in that place.
I also looked at the 'diff' before my post, but the differences are just huge.

Which values did you have in mind for changing in the default php.ini?

Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Stuart Henderson
check phpinfo() and determine whether the extension is not being
loaded, or whether it is loaded but the connection is failing.


On 2012-03-14, Uwe Dippel udip...@gmail.com wrote:
 I have this unfortunate occurrence on one of my production machines:
 Database Error: Unable to connect to the database:Could not connect to MySQL
 I studied the Upgrade Guide 4.9 to 5.0 intensely before and after, but
 can't find what went wrong. I just did the upgrade, and made the links
 as proposed (so I hope)

 # pwd
 /etc/php-5.2
 # ls -l
 total 0
 lrwxr-xr-x  1 root  wheel  26 Mar 14 17:26 gd.ini - 
 /etc/php-5.2.sample/gd.ini
 lrwxr-xr-x  1 root  wheel  29 Mar 14 17:25 mysql.ini -
 /etc/php-5.2.sample/mysql.ini

 # ls -l /var/www/conf/modules
 total 0
 lrwxr-xr-x  1 root  daemon  41 Mar 14 16:26 php.conf -
 /var/www/conf/modules.sample/php-5.2.conf

 I also tried to copy the modified php.ini from /var/www/conf to 
 /etc/php-5.2.ini
 Then the result is:
 Database Error: Unable to connect to the database:The MySQL adapter
 mysql is not available.

 pkg_info looks okay:
 mini_sendmail-chroot-1.3.6p1 static mini_sendmail for chrooted apache
 mysql-client-5.1.54p0 multithreaded SQL database (client)
 mysql-server-5.1.54p9 multithreaded SQL database (server)
 nano-2.2.6  Pico editor clone with enhancements
 [...]
 pfstat-2.3p1packet filter statistics visualization
 php-5.2.17p5server-side HTML-embedded scripting language
 php-gd-5.2.17p4 image manipulation extensions for php5
 php-mysql-5.2.17p3  mysql database access extensions for php5
 png-1.5.4   library for manipulating PNG images

 I am very grateful for any help or advice how to further debug this.

 Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Uwe Dippel
On Wed, Mar 14, 2012 at 6:55 PM, Fred Crowson fred.crow...@gmail.com wrote:

 What does your logs say in /var/mysql/ ?

 hth

Yes, Fred, very much! - It is obvious that I failed - and still fail -
to understand the new startup system. Can anyone point me to a
complete overview to read up on it?
I don't get yet which utility starts and controls the package scripts in rc.d.
And slightly OT: I have stared at the
pkg_scripts=${pkg_scripts} postfix in the Upgrade Guide, and still
don't grasp what this is supposed to do, and where; since I am running
postscript.

Thanks again,

Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Rodolfo Gouveia
On Wed, Mar 14, 2012 at 08:21:43PM +0800, Uwe Dippel wrote:
 I don't get yet which utility starts and controls the package scripts in rc.d.
 And slightly OT: I have stared at the
 pkg_scripts=${pkg_scripts} postfix in the Upgrade Guide, and still
 don't grasp what this is supposed to do, and where; since I am running
 postscript.

http://www.openbsd.org/faq/faq10.html#rc
man rc.d



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Uwe Dippel
On Wed, Mar 14, 2012 at 8:35 PM, Rodolfo Gouveia rgouv...@cosmico.net wrote:

 And slightly OT: I have stared at the
 pkg_scripts=${pkg_scripts} postfix in the Upgrade Guide, and still
 don't grasp what this is supposed to do, and where; since I am running
 postscript.

 http://www.openbsd.org/faq/faq10.html#rc
 man rc.d

I had read those. And yet, I don't understand that line. It doesn't
look like it should be written into rc.conf / rc.conf.local, does it?
Correct me if I'm wrong. It looks like a shell variable that has
'postfix' appended.

Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Uwe Dippel
On Wed, Mar 14, 2012 at 10:22 PM, Uwe Dippel udip...@gmail.com wrote:

 I had read those. And yet, I don't understand that line. It doesn't
 look like it should be written into rc.conf / rc.conf.local, does it?
 Correct me if I'm wrong. It looks like a shell variable that has
 'postfix' appended.

Ooops, I think I got it finally. The shell variable is defined in
rc.conf, and actually has 'postfix' appended when rc.conf.local is
being run.
Personally, I would not have expected the variable to be created in
rc.conf, because since 4. something it is being considered 'clean' of
user entries at upgrade.
Would it not be better to add package start strings in rc.conf.local only?

Uwe



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Norman Golisz
Hi Uwe,

On Wed Mar 14 2012 22:47, Uwe Dippel wrote:
 On Wed, Mar 14, 2012 at 10:22 PM, Uwe Dippel udip...@gmail.com wrote:
 
  I had read those. And yet, I don't understand that line. It doesn't
  look like it should be written into rc.conf / rc.conf.local, does it?
  Correct me if I'm wrong. It looks like a shell variable that has
  'postfix' appended.
 
 Ooops, I think I got it finally. The shell variable is defined in
 rc.conf, and actually has 'postfix' appended when rc.conf.local is
 being run.
 Personally, I would not have expected the variable to be created in
 rc.conf, because since 4. something it is being considered 'clean' of
 user entries at upgrade.
 Would it not be better to add package start strings in rc.conf.local only?

of course it is declared in rc.conf. This file is used by rc(8) to define
and control its variables. rc.conf.local is sourced by rc.conf.local near
at the end to overwrite the defaults with user-defined values.

Hence, it is still true, you put your local modifications into
rc.conf.local, to prevent the upgrade script from overwriting them.

So, to let rc(8) start daemons installed by pkg_add, you configure
$pkg_scripts in /etc/rc.conf.local, accordingly:

pkg_scripts=postfix mpd etc

Note that rc(8) starts them in the order you provide with $pkg_scripts.

Yours,
Norman



Re: MySQL connection error after upgrade 4.9-5.0

2012-03-14 Thread Stuart Henderson
On 2012-03-14, Uwe Dippel udip...@gmail.com wrote:
 I had read those. And yet, I don't understand that line. It doesn't
 look like it should be written into rc.conf / rc.conf.local, does it?
 Correct me if I'm wrong. It looks like a shell variable that has
 'postfix' appended.

rc.conf / rc.conf.local *are* shell scripts

all that sample line does is append to any existing pkg_scripts
variable (for ease of copy-and-pasting, and to make it easier to
keep the lines a sensible length..)