Koozali.org: home of the SME Server

Mysql 5.0.22 fix privileges table problem

discovery

Mysql 5.0.22 fix privileges table problem
« on: December 28, 2006, 08:21:31 AM »
Hi All,

I finally took the plunge and upgraded to SME 7.

On a clean install I have upgraded the mysql to version 5.0.22 with the following how to

http://no.longer.valid/phpwiki/index.php/How-To%20upgrade%20to%20MySQL%205%20and%20PHP%205

Everything appears to be working ok Horde/Webmail, phpmyadmin and the mysql command prompt.

The only thing that does not work is a simple php script that tests access to the databases. But works fine on version 4.1.20 (standard mysql install on SME7)

Php script start

<?php

   define("DB_HOST", "localhost");
   define("DB_USERNAME", "root");
   define("DB_PASSWORD", "myrootpassword");
   define("DB_NAME", "testdb");


   $link = mysql_connect(DB_HOST,DB_USERNAME,DB_PASSWORD);

   if (!$link) {
      die('Could not connect to MySQL: ' . mysql_error());
   }

   echo 'Connection OK';
   mysql_close($link);

?>

PHP script end

When I run the script, I get the following error.

Could not connect to MySQL: Lost connection to MySQL server during query

I am thinking this could be privilege related (I'm guessing here!)!

Now when I go into phpmyadmin and click on the privileges button I get the following error message:

Warning: Your privilege table structure seems to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

I have found a sql script in /usr/bin/mysql_fix_privileges_table.sql

Is this the right one???

I have run this but it seems to do nothing and it appears that it is the old version 4 fix not version 5???

Does anyone have a copy of the new mysql_fix_privileges_table.sql script for version 5.0.22, or point me in the right direction where I might be able to download it?

Or please give me a hand with the switches that the script requires to run?

I hope everyone had a good Christmas and Bring on 2007!!!

I would greatly apppreciate any help.

Cheers

Rob aka Discovery

damjan

Mysql 5.0.22 fix privileges table problem
« Reply #1 on: December 28, 2006, 04:47:02 PM »
Hi,

I have faced the same problem here. If you can find some solution for this please made a post here.


br
Damjan

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Re: Mysql 5.0.22 fix privileges table problem
« Reply #2 on: December 29, 2006, 04:46:24 AM »
Quote from: "discovery"


http://no.longer.valid/phpwiki/index.php/How-To%20upgrade%20to%20MySQL%205%20and%20PHP%205



That how to was put together using info from a French site and is very much a use at your own risk sort of thing.

I have a private how to for doing a 'fullysic' upgrade. The last four lines might be of interest to you.

http://magicwilly.webhostingpal.com/phpwiki/index.php?pagename=Quick%20and%20Nasty%20update%20to%20Latest%20and%20Greatest

Oh, this how to is even more use at your own risk yada yada yada.
Regards,
William

IF I give advise.. It's only if it was me....

damjan

Mysql 5.0.22 fix privileges table problem
« Reply #3 on: December 29, 2006, 08:43:39 AM »
hi,

can you check the URL link please?

br
Damjan

discovery

Mysql 5.0.22 fix privileges table problem
« Reply #4 on: December 30, 2006, 01:34:32 PM »
Thank you very much William!!!

The last 4 lines did work for me!! Now phpmyadmin is not complaining about the privilege tages requiring updating - so thanks once again!!

Now my little Test PHP script still appears with the following error

Lost connection to MySQL server during query

Any ideas?????

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Mysql 5.0.22 fix privileges table problem
« Reply #5 on: December 30, 2006, 02:33:43 PM »
Quote from: "discovery"
Thank you very much William!!!

The last 4 lines did work for me!! Now phpmyadmin is not complaining about the privilege tages requiring updating - so thanks once again!!

Now my little Test PHP script still appears with the following error

Lost connection to MySQL server during query

Any ideas?????
Build in an error handler in your php code... there should be a return code for the mysql funciton in the php script which will probably give you more details.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)