Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: mike_mattos on May 30, 2006, 05:22:54 PM
-
Please test on a fresh install, because it is likely to destroy some settings and data! Perhaps someone can refine it to not kill webmail!
1 # mysql
logs in as version 4.1.12
2 mysql> quit;
3 # /etc/rc.d/init.d/supervise/mysqld status
/service/mysqld: run (pid 29128) 53510 seconds, normally down
4 # /etc/rc.d/init.d/supervise/mysqld stop
Stopping mysqld: [ OK ]
5 # /etc/rc.d/init.d/supervise/mysqld status
/service/mysqld: down 6 seconds
6 # rpm -e mysql-server --nodeps
7 # rpm -e mysql --nodeps
8 Download
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-1.c4.i386.rpm
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-1.c4.i386.rpm
Do NOT get the versions with 5.0.18-2.1, they fail dependecies!
9 # rpm -Uvh mysql-5.0.18-1.c4.i386.rpm
10 # rpm -Uvh mysql-server-5.0.18-1.c4.i386.rpm
11 # mysql ( see what happens )
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18
13 reboot
14 # mysql ( make sure it restarted automatically! )
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18
15 Check Web Mail
A fatal error has occurred
DB Error: insufficient permissions
Details have been logged for the administrator.
16 Reset per Charly Brady , destroys data!!
# cd /service/mysqld
# runsvctrl d .
# /etc/e-smith/events/actions/mysql-delete-db-files
# signal-event post-upgrade
# signal event reboot
15 Check Web Mail
GOT LOGIN!!!
-
This would be the short version:
(Note that this includes mysqlclient because of the dependencies mentioned above)
Download and install:
wget \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysqlclient14-4.1.14-4.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-2.1.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-2.1.c4.i386.rpm
rpm -U \
mysql-5.0.18-2.1.c4.i386.rpm \
mysql-server-5.0.18-2.1.c4.i386.rpm \
mysqlclient14-4.1.14-4.c4.i386.rpm
Remove extra configuration file and apply changes to daemon
rm -f /etc/my.cnf.rpmnew
service mysqld restart
Fix privileges
(See Horde issue below for details)
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
Testing went as follows:
System: VMWare SME Server 7.0rc2 default configuration
Clean installation
Server Manager: Enable Webmail
MySQL: Create mydb, mydb.mytable, grant select by myuser:mypw@localhost
Backup to Desktop
Webmail login
Verify: describe mydb.mytable using myuser
(Upgrade as above)
Webmail login
Verify: describe mydb.mytable using myuser
Restore from desktop
Webmail login
Verify: describe mydb.mytable using myuser
Backup to Desktop
Restore from Desktop
Webmail login
Verify: describe mydb.mytable using myuser
All successful
Horde issue:
It seems horde does not init with a grant statement, rather it inserts what it assumes is correct.
The issue is due to missing data in mysql.db. The grant statement fixes this.
This means that after restoring a backup previous to the upgrade, this command should be reissued.
However, in the above tests, this wasn't necessary. Don't know why though...
-
Download and install:
wget \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysqlclient14-4.1.14-4.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-server-5.0.18-2.1.c4.i386.rpm \
http://dev.centos.org/centos/4/testing/i386/RPMS/mysql-5.0.18-2.1.c4.i386.rpm
rpm -U \
mysql-5.0.18-2.1.c4.i386.rpm \
mysql-server-5.0.18-2.1.c4.i386.rpm \
mysqlclient14-4.1.14-4.c4.i386.rpm
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?
-
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?
What 5.0.18 client? Didn't see it on http://dev.centos.org/centos/4/testing/i386/RPMS/
-
Is there a special reason to install the 4.1.14 client and not the 5.0.18 client?
What 5.0.18 client? Didn't see it on http://dev.centos.org/centos/4/testing/i386/RPMS/
Sorry, did not have a look there. Normally MySQL ships a client with the same version number as the server, at least on their own site. I don't understand why it isn't on the Centos site...
MySQL hosts the RHEL 4 version of there RPMS itself, maybe they will work on SME Server as well. If I have the time I might give it a go.
-
I followed the how to from mike_mattos, but webmail -horde is starting in the browser fatal error.
further i tried to install phpbb for mysql test and the install script said that the the php version doesn´t support the database type.
How can the problems fixed?
-
the last 3 items in the how to relate to the horde issue, also the grant statement in the follow up!
I'll try to update this again with the lastest rpm's
BTW, I put in a lot of extra steps just to be sure everything was working/shutdown, this upgrade has been a real pain in the ass for working for a while for some features, and then failing! So please let me know if you did the webmail test & repair I suggested
-
i tried it as decribed and executed
rm -f /etc/my.cnf.rpmnew
service mysqld restart
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES" too
But webmail had fatal error.
-
Could you tell us a little bit more about this fatal error?
(On screen and preferably from logs)
-
Hello mike_mattos,
I try it and work fine for me !!! :-D :-D :-D
But I di this command:
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
AND I don't di this command:
16 Reset per Charly Brady , destroys data!!
# cd /service/mysqld
# runsvctrl d .
# /etc/e-smith/events/actions/mysql-delete-db-files
# signal-event post-upgrade
# signal event reboot
After I go to the server-manager and click on REBOOT AND RECONFIGURE
So everything goes fine for the moment My eGroupWare application works :-D :-D :-D
So I will be able now to use SynML with eGroupWare and Outlokk...
Thanks,
Snoopyski
-
Hello
I found one BUG this morning in a eGroupWare module:
PHPSYSINFO
ERRORS
File Line Command Message
common_functions.php 313 file_exists(/proc/loadavg) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/sys/kernel/hostname) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/version) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/uptime) the file does not exist on your machine
common_functions.php 152 find_program(who) program not found on the machine
common_functions.php 313 file_exists(/proc/net/dev) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/cpuinfo) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/pci) the file does not exist on your machine
common_functions.php 340 is_dir(/proc/ide) directory does not exist on your machine
common_functions.php 313 file_exists(/proc/scsi/scsi) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/bus/usb/devices) the file does not exist on your machine
common_functions.php 313 file_exists(/proc/meminfo) the file does not exist on your machine
common_functions.php 152 find_program(df) program not found on the machine
common_functions.php 152 find_program(mount) program not found on the machine
Any Idea ?
Thanks,
Snoopyski
-
There seems to be some security in place keeping the web server process www confined to it's own directories. Meaning php can't read files in / or /proc, or detect programs located in PATH or things like that.
Anyway, it's completely unrelated to MySQL, try a new thread if you wish to continue trying to resolve this...
-
Yes ??????????
But works before the MySQL upgrade I think !!!
I will let you know...
A+
Snoopyski
-
intersting glitch ; if you stop mysql5 with
/etc/init.d/mysqld stop
it appears to restart but you can;'t run a MySQL session, you get an error about the socket not working.
HOWEVER,
/etc/rc.d/init.d/supervise/mysqld stop
followed by
/etc/rc.d/init.d/supervise/mysqld start
repairs the problem
-
http://dev.centos.org/centos/4/testing/i386/RPMS/*mysql* seem to have been deleted!
the Centos rpm's that CentOS 'yum update mysql' detects work fine on my CentOS 4 system, but won't install on SME! (dependencies!)
Prior to downloading from MySQL, am I missing something obvious? I looked in centos/4 and in centos/4.3
thx all
-
http://dev.centos.org/centos/4/testing/i386/RPMS/*mysql* seem to have been deleted!
the Centos rpm's that CentOS 'yum update mysql' detects work fine on my CentOS 4 system, but won't install on SME! (dependencies!)
Prior to downloading from MySQL, am I missing something obvious? I looked in centos/4 and in centos/4.3
thx all
Following centos bug 1124 (http://bugs.centos.org/view.php?id=1124) it is now in http://mirror.centos.org/centos/4/centosplus/i386/RPMS/
-
here is a revised script that works (Aug 24,2006) Note the new server and new version numbers.
Thanks DarkMirage and Cactus!
wget \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysqlclient14-4.1.14-4.2.c4.1.i386.rpm \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-server-5.0.22-1.centos.1.i386.rpm \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-5.0.22-1.centos.1.i386.rpm
rpm -U mysql-5.0.22-1.centos.1.i386.rpm \
mysql-server-5.0.22-1.centos.1.i386.rpm \
mysqlclient14-4.1.14-4.2.c4.1.i386.rpm
rm -f /etc/my.cnf.rpmnew
service mysqld restart
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
-
Can someone confirm that webmail functions properly after this upgrade?
-
it worked ok for me
this was a new system, and web mail worked when I added accounts
-
it works fine
here my methode with yum:
mysqldump -aec >mondump.sql
/etc/rc.d/init.d/mysql stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysql start
And if the webmail has no access to the data :
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
[/code]
-
any reason why nobody is using yum in this thread?
yum --enablerepo=centosplus search mysql
-
any reason why nobody is using yum in this thread?
yum --enablerepo=centosplus search mysql
READ! just before you someone posted his way using yum.
The rpm command comes from people who are used to using rpm from earlier times, it allows for a lot more options, which can be very usefull if you are trying to figure out why things do not work (as long as you know what you are doing off course).
I would indeed also preffer to use yum, especially if posting Howto's as this is the preffered method of installing packages on CentOS (and therefore SME Server).
-
Hi Unnilennium,
I've a production server (SME7) with some Joomla! sites on it. The next version of Joomla (1.5) is based on MySQL 5 so I want to be able to migrate to that version.
My SME-box is also my mailserver and fileserver. I also have several Dungog modules installed.
How save is it to use your "yum" script on a production server?
it works fine
here my methode with yum:
mysqldump -aec >mondump.sql
/etc/rc.d/init.d/mysql stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysql start
And if the webmail has no access to the data :
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
[/code]
Thanks,
-
Hi
I have my production server running mysql5 for few days with this methode. it works great and with php 4.3.9-3.15.
What i could add is :
-i didn't need to grant the mysql rights for the webmail it was ok for me.
-i would add another thing a new table is necessary for mysql 5 so you will have to add it manually (if you forgot it, it may works, but it's better to have a clean install):
So here the complete how to :
mysqldump -aec >mondump.sql
/etc/rc.d/init.d/mysql stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysql start
And if the webmail has no access to the data :
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
Finaly:
-- MySQL dump 10.10
--
-- Host: localhost Database: mysql
-- ------------------------------------------------------
-- Server version 5.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table proc
--
DROP TABLE IF EXISTS proc;
CREATE TABLE proc (
db char(64) character set utf8 collate utf8_bin NOT NULL default ,
name char(64) NOT NULL default ,
type enum('FUNCTION','PROCEDURE') NOT NULL,
specific_name char(64) NOT NULL default ,
language enum('SQL') NOT NULL default 'SQL',
sql_data_access enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL',
is_deterministic enum('YES','NO') NOT NULL default 'NO',
security_type enum('INVOKER','DEFINER') NOT NULL default 'DEFINER',
param_list blob NOT NULL,
returns char(64) NOT NULL default ,
body longblob NOT NULL,
definer char(77) character set utf8 collate utf8_bin NOT NULL default ,
created timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
modified timestamp NOT NULL default '0000-00-00 00:00:00',
sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default ,
comment char(64) character set utf8 collate utf8_bin NOT NULL default ,
PRIMARY KEY (db,name,type)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
-
I removed my stupid post because I had no idea that mysql has been updated, my mistake
-
@catus
You'll have to forgive me if I don't have time to read every post from every member. You might want to watch your tone of voice -afterall, I'm trying to help.
Even if it is there, it probably isn't a bad idea to post it again -even now. After all, it did take everyone on this thread (including yourself) more than 20 posts to come to that joint conclusion.
Furthermore, even after the yum post (in duplicate), people are continuing to post scripts that do what yum is already designed to do.
yum --enablerepo=centosplus search mysql
yum --enablerepo=centosplus yum <casesensitivepackagename>
Finally, there's probably good reason as to why these are not in the centos base. If a production server is in question, general wisdom would urge the server admin to follow what the maintainers recommend.
-
Hi Unnilennium,
Thanks for your script. I updated MySQL. I had also to fix Horde but now it works fine.
But when I want to create the table proc I got an error.
I did:
DROP TABLE IF EXISTS proc;
CREATE TABLE proc (
db char(64) character set utf8 collate utf8_bin NOT NULL default ,
name char(64) NOT NULL default ,
type enum('FUNCTION','PROCEDURE') NOT NULL,
specific_name char(64) NOT NULL default ,
language enum('SQL') NOT NULL default 'SQL',
sql_data_access enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL',
is_deterministic enum('YES','NO') NOT NULL default 'NO',
security_type enum('INVOKER','DEFINER') NOT NULL default 'DEFINER',
param_list blob NOT NULL,
returns char(64) NOT NULL default ,
body longblob NOT NULL,
definer char(77) character set utf8 collate utf8_bin NOT NULL default ,
created timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
modified timestamp NOT NULL default '0000-00-00 00:00:00',
sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default ,
comment char(64) character set utf8 collate utf8_bin NOT NULL default ,
PRIMARY KEY (db,name,type)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
The following error pops up:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
name char(64) NOT NULL default ,
type enum('FUNCTION','PROCEDURE') NOT NU' at line 2
Any idea what could be wrong?
Thanks,
-
There seems to be some security in place keeping the web server process www confined to it's own directories. Meaning php can't read files in / or /proc, or detect programs located in PATH or things like that.
Anyway, it's completely unrelated to MySQL, try a new thread if you wish to continue trying to resolve this...
It is PHP basedir security and is indeed worth a seperate thread, is allows PHP to only access subdirectories in the tree below as specified per the httpd.conf file.
-
I think that:
default ,
must be:
default '',
is that correct ?
Thanks,
-
that's right
here is the new version:
CREATE TABLE proc (
db char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
name char( 64 ) NOT NULL default '',
type enum( 'FUNCTION', 'PROCEDURE' ) NOT NULL ,
specific_name char( 64 ) NOT NULL default '',
language enum( 'SQL' ) NOT NULL default 'SQL',
sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) NOT NULL default 'CONTAINS_SQL',
is_deterministic enum( 'YES', 'NO' ) NOT NULL default 'NO',
security_type enum( 'INVOKER', 'DEFINER' ) NOT NULL default 'DEFINER',
param_list blob NOT NULL ,
returns char( 64 ) NOT NULL default '',
body longblob NOT NULL ,
definer char( 77 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
created timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
modified timestamp NOT NULL default '0000-00-00 00:00:00',
sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) NOT NULL default '',
comment char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
PRIMARY KEY ( db , name , type )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COMMENT = 'Stored Procedures'
-
why not yum? well, I used yum on a CentOS system with no problems,
yum update mysql and yum update php both work without breaking anything on CentOS
but got errors using yum on SME, even after enabling Centosplss. ( It retrieved MySQL5 but then gave errors )
The CentOS site has many posts and links saying which repositories have which features, and also how to add to the repositories, but I'm not finding that information on this site. How would one know that MySQL is in CentosPlus and not in centos testing, or sme testing?
Is there an SME yum guide to explain the differences between SME and CentOS repositories, and how to enable them? On Centos the ini file is edited, that doesn't seem to be the sme method
-
Mike,
Yum is like an UNIX command. Flexible to the point that it's frustrating the first few times you use it. Once you get over that hump it saves time. Yum sure is good with dependencies.
Here's what I do:
NEED TO MY INSTALLED REPOSITORIES?
db yum_repositories show |grep repository
NEED TO FIND IF AN RPM IS IN A REPO?
yum search --enablerepo=<reponame>
NEED TO INSTALL FROM A NON STANDARD REPO?
yum install --enablerepo=<reponame>
or update or remove
NEED TO TURN ON A REPO FULL TIME
Use caution here... because, as you discussed, you don't know what's in a repo and could update things you don't want updated.
db yum_repositories setprop centosplus Visible yes
db yum_repositories setprop centosplus status enabled
expand-template /etc/yum.conf
EXCLUDE AN RPM FROM UPADATING FROM A PARTICULAR REPO?
For instance you are using an openldap that is likely to be overwritten by a SME update one of your "enabled" repos.
db yum_repositories setprop base Exclude openldap*
db yum_repositories setprop updates Exclude openldap*
db yum_repositories setprop smeos Exclude openldap*
expand-template /etc/yum.conf
Hope this helps.
-
thx, I'll poke around at it
one question though, how do you get the "name" to search? That is to say, if you wanted to update MySQL from 4.0 to 4.1 and not to 5.0, or wanted to know if there was an update for an application, how do you see the rpm version info?
Is there a generic site for yum to search the way you can search for rpm's or distro's or dll's?
thx again
-
yum search --enablerepo=<reponame>
Unfortunately... this will come up with lots of answers... mysql-client is easier to find... returns fewer results.
-
I use SME7 + MySQL 5.0.22
It works fine but when I reboot I get the following error:
Starting mysql.init: Loading 30mysql_create_tables into MySQL. Error 2013 (HY000) at line 11: Lost connection to MySQL server during query [FAILED][FAILED]
I looked into 30mysql_create_tables:
CREATE DATABASE IF NOT EXISTS horde;
CONNECT horde;
CREATE TABLE IF NOT EXISTS horde_users (
user_uid varchar(255) not null,
user_pass varchar(32) not null,
primary key (user_uid)
);
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users TO horde@localhost;
CREATE TABLE IF NOT EXISTS horde_prefs (
pref_uid char(255) not null,
pref_scope char(16) not null default '',
pref_name char(32) not null,
pref_value text null,
primary key (pref_uid, pref_scope, pref_name)
);
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_prefs TO horde@localhost;
CREATE TABLE IF NOT EXISTS horde_categories (
category_id INT not null,
group_uid VARCHAR(255) not null,
user_uid VARCHAR(255),
category_name VARCHAR(255) not null,
category_data TEXT null,
category_serialized SMALLINT DEFAULT 0 not null,
category_updated TIMESTAMP,
PRIMARY KEY (category_id)
);
CREATE TABLE IF NOT EXISTS horde_categories_categories (
category_id_parent INT not null,
category_id_child INT not null,
PRIMARY KEY (category_id_parent, category_id_child)
);
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories TO horde@localhost;
GRANT SELECT, INSERT, UPDATE, DELETE ON horde_categories_categories TO horde@localhost;
FLUSH PRIVILEGES;
When I tried to execute this query from PhpMyAdmin it gives the following error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONNECT horde' at line 1
What could be wrong?
Thanks,
-
hi here something funny:
this commands GRANT SELECT, INSERT, UPDATE, DELETE ON horde_users TO horde@localhost
does not seem to be accepted by mysql 5 on SME ...
it is from the dump /home/e-smith/httpd/horde/scripts/db/mysql_create_tables.sql
it called by /etc/e-smith/sql/init/30mysql_create_tables
which is called when you do
/etc/rc.d/init.d/mysql.init restart
one othe rtable forgotten :
DROP TABLE IF EXISTS procs_priv;
CREATE TABLE procs_priv (
Host char(60) collate utf8_bin NOT NULL default '',
Db char(64) collate utf8_bin NOT NULL default '',
User char(16) collate utf8_bin NOT NULL default '',
Routine_name char(64) collate utf8_bin NOT NULL default '',
Routine_type enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL,
Grantor char(77) collate utf8_bin NOT NULL default '',
Proc_priv set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '',
Timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
KEY Grantor (Grantor)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
and after it works !!!!!!!!!!!!!!
-
@mike_mattos
Yum searches are not case sensitive. The following search will pull a list of every rpm in a repo that has mysql in the name or description:
#yum search --enablerepo=extras mysql
Yum installs are case sensitive and version sensitive.
#yum install mysql.i386-4.1.20-1.RHEL4.1
The following will show more:
#man yum
-
So what you have to do to install MySQL 5 on SME7 is:
==============================
STEP 1: MAKE A BACKUP OF YOUR DATABASES:
==============================
mysqldump -aec >backup_mysql_databases.sql
==========================
STEP 2: GET THE NEW RPM'S:
==========================
THERE ARE TWO WAYS OF DOING THIS:
-------------
FIRST METHOD:
-------------
wget \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysqlclient14-4.1.14-4.2.c4.1.i386.rpm \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-server-5.0.22-1.centos.1.i386.rpm \
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-5.0.22-1.centos.1.i386.rpm
rpm -U mysql-5.0.22-1.centos.1.i386.rpm \
mysql-server-5.0.22-1.centos.1.i386.rpm \
mysqlclient14-4.1.14-4.2.c4.1.i386.rpm
/etc/rc.d/init.d/mysqld stop
rm -f /etc/my.cnf.rpmnew
/etc/rc.d/init.d/mysqld start
To fix the privileges on Horde:
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
-------------------------
SECOND METHOD: (prefered)
-------------------------
/etc/rc.d/init.d/mysqld stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysqld start
To fix the privileges on Horde:
mysql -e "GRANT SELECT,INSERT,UPDATE,DELETE ON horde.* TO 'horde'@'localhost';FLUSH PRIVILEGES"
===================================================
STEP 3: ADD MISSING MySQL-TABLES TO MYSQL DATABASE: (for instance with PhpMyAdmin)
===================================================
DROP TABLE IF EXISTS proc;
CREATE TABLE proc (
db char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
name char( 64 ) NOT NULL default '',
type enum( 'FUNCTION', 'PROCEDURE' ) NOT NULL ,
specific_name char( 64 ) NOT NULL default '',
language enum( 'SQL' ) NOT NULL default 'SQL',
sql_data_access enum( 'CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) NOT NULL default 'CONTAINS_SQL',
is_deterministic enum( 'YES', 'NO' ) NOT NULL default 'NO',
security_type enum( 'INVOKER', 'DEFINER' ) NOT NULL default 'DEFINER',
param_list blob NOT NULL ,
returns char( 64 ) NOT NULL default '',
body longblob NOT NULL ,
definer char( 77 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
created timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
modified timestamp NOT NULL default '0000-00-00 00:00:00',
sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) NOT NULL default '',
comment char( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
PRIMARY KEY ( db , name , type )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COMMENT = 'Stored Procedures';
DROP TABLE IF EXISTS procs_priv;
CREATE TABLE procs_priv (
Host char(60) collate utf8_bin NOT NULL default '',
Db char(64) collate utf8_bin NOT NULL default '',
User char(16) collate utf8_bin NOT NULL default '',
Routine_name char(64) collate utf8_bin NOT NULL default '',
Routine_type enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL,
Grantor char(77) collate utf8_bin NOT NULL default '',
Proc_priv set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '',
Timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
KEY Grantor (Grantor)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
======================
STEP 4: RESTART MySQL:
======================
You simply reboot the server
OR
without rebooting the server:
/etc/rc.d/init.d/mysqld stop;
/etc/rc.d/init.d/mysqld start;
/etc/rc.d/init.d/mysql.init restart;
===========================================
Is this correct?
-
correct no more to add, the perfect how to .
---
and stop flood, just open a new topic for YUM discusions, thank you.
-
this is what i got after wget all 3:
[root@jttrade lib]# rpm -U mysql-5.0.22-1.centos.1.i386.rpm
error: Failed dependencies:
libmysqlclient.so.14 is needed by (installed) perl-DBD-MySQL-2.9004-3.1.i386
libmysqlclient.so.14 is needed by (installed) dovecot-0.99.14-1.2.el4.rf.i386
libmysqlclient.so.14 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient.so.14 is needed by (installed) php-mysql-4.3.9-3.15.i386
libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) php-mysql-4.3.9-3.15.i386
libmysqlclient_r.so.14 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient_r.so.14(libmysqlclient_14) is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
mysql = 4.1.20-1.RHEL4.1 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
-
are there any easy way to install this?
php-domxml is needed by package e-smith-horde
tryed
wget ftp://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/SRPMS/php-4.3.10-2.4.src.rpm
rpm -U php-4.3.10-2.4.src.rpm
trying to install mysql but fails everytime
-
are there any easy way to install this?
php-domxml is needed by package e-smith-horde
tryed
wget ftp://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/SRPMS/php-4.3.10-2.4.src.rpm
rpm -U php-4.3.10-2.4.src.rpm
trying to install mysql but fails everytime
Are you trying to update MYSQL or PHP ?
Rien was saying for the without yum methode:
rpm -U mysql-5.0.22-1.centos.1.i386.rpm \
mysql-server-5.0.22-1.centos.1.i386.rpm \
mysqlclient14-4.1.14-4.2.c4.1.i386.rpm
Which doesn't mean
rpm -U mysql-5.0.22-1.centos.1.i386.rpm
then
rpm -U mysql-server-5.0.22-1.centos.1.i386.rpm
then
rpm -U mysqlclient14-4.1.14-4.2.c4.1.i386.rpm
so copy and paste the 3 lines in one time and execute.
BUT I suggest you the easier methode : the yum one:
/etc/rc.d/init.d/mysqld stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysqld start
The update of PHP is a little more complicated, and it is even more difficult when youy use a source RPM :)[/code]
-
Thank you...this was helpful.
Now i understand the syntax.
But still doesnt apply on my server.
Te goal is to run it as a webserver ontop of all feature like mail, ftp, firewall, printer-server.
I want this webserver to host my website written in php.
I understud the other part with hosting several domains.
-
Munter,
there's already PHP4 and mysql 4 to run a website in php on sme 7.
do you absolutly need to update to mysql 5 ?
if yes what return the try with yum ?
/etc/rc.d/init.d/mysqld stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysqld start
-
Munter,
there's already PHP4 and mysql 4 to run a website in php on sme 7.
do you absolutly need to update to mysql 5 ?
if yes what return the try with yum ?
/etc/rc.d/init.d/mysqld stop
yum --enablerepo=centosplus update mysql
/etc/rc.d/init.d/mysqld start
First of all, thanks for trying help me.
Did trye yum but it also complaining about this: Error: Missing Dependency: php-domxml is needed by package e-smith-horde
================================================================
No new rpms were installed. No additional commands are required.
================================================================
[root@jttrade ~]# /etc/rc.d/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
its not really important to upgrade to ver5 but now doesnt mysql start at all :-)
maybe i should reinstall my server and be happy with ver 4.
I do have some small issues with password streangth and backup.
So i think we save some time to reinstall this time.
After that i need to learn howto manage mysql and php on my server aswell... dont have any knowlege in manage mysql.... just use it on an expensive payserver
-
its not really important to upgrade to ver5 but now doesnt mysql start at all :-)
Reboot and it should restart.
Have a look at this post..
http://forums.contribs.org/index.php?topic=33434.msg143545#msg143545
and try the how-to to get around the php-domxml problem.
-
its not really important to upgrade to ver5 but now doesnt mysql start at all :-)
Reboot and it should restart.
Have a look at this post..
http://forums.contribs.org/index.php?topic=33434.msg143545#msg143545
and try the how-to to get around the php-domxml problem.
found another post in this forum.
Guess what dudes??...YES .. its working..my webmail, server-manager..ffs everything works!!!
good job everyone involved :lol:
-
its not really important to upgrade to ver5 but now doesnt mysql start at all :-)
Reboot and it should restart.
Have a look at this post..
http://forums.contribs.org/index.php?topic=33434.msg143545#msg143545
and try the how-to to get around the php-domxml problem.
found another post in this forum.
Guess what dudes??...YES .. its working..my webmail, server-manager..ffs everything works!!!
good job everyone involved :lol:
Thanks
-
Works for me too!