Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: discovery 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
-
Hi,
I have faced the same problem here. If you can find some solution for this please made a post here.
br
Damjan
-
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.
-
hi,
can you check the URL link please?
br
Damjan
-
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?????
-
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.