# Stabilisation of dev-db/mysql-4.1.14

## amne

Dev-db/mysql-4.1.14 will soon be moved into the stable tree on its supported architectures, see this thread on the gentoo-dev mailing list and bug 109301 for information.

This is a pretty bumpy upgrade, so please read the upgrading guide carefully before upgrading. In general, you cannot upgrade directly.

Note that mysql-4.0* will remain in the tree for a long time yet. Should you not want to upgrade now, please add

```
>=dev-db/mysql-4.1
```

to /etc/portage/package.mask.

Edit: Should perhaps have this in the first post here..

See also the Upgrading from Version 4.0 to 4.1 section of the official MySQL 4.1 Reference Manual

----------

## grimm26

the upgrade guide has a typo.  Code listing 2.1 is missing a backslash at the end of the second to last line.  Should be

```
# mysqldump \

  -uroot \

  -p$PASSWORD \

  -hlocalhost \

  --all-databases \

  --all \

  --opt \

  --allow-keywords \

  --flush-logs \

  --hex-blob \

  --master-data \

  --max_allowed_packet=16M \

  --quote-names \

  --result-file=BACKUP_MYSQL_4.0.SQL

```

----------

## kallamej

 *grimm26 wrote:*   

> the upgrade guide has a typo.

 

Fixed

----------

## grimm26

Upgrade went smoothly for me.  I use  postfix, apache, online-bookmarks, gallery2 and syslog-ng with mysql and all work fine at mysql-4.1.14 after using the upgrade process.  However, revdep-rebuild does not pick up the fact that /usr/nagios/bin/nagios (net-analyzer/nagios-core) needs to be rebuilt.  Maybe I don't know the right option to feed revdep-rebuild to catch this one, but there is no man page for it  :Sad: 

----------

## den_RDC

The upgrade manual says "Under certain conditions it's possible to directly upgrade to the next major version of MySQL". What are those conditions exactly? I want to upgrade using the fast but dangerous method because the safe and slow method will come with too much downtime (pretty large tables and a lot of them). Is there also a way to compile the programs that depend on mysql against mysql-4.1 while 4.0 is still installed & running (as binary packages, not-yet-merged ofcourse, but when the time is there it will be a lot faster to emerge)

----------

## bonbons

 *den_RDC wrote:*   

> The upgrade manual says "Under certain conditions it's possible to directly upgrade to the next major version of MySQL". What are those conditions exactly? I want to upgrade using the fast but dangerous method because the safe and slow method will come with too much downtime (pretty large tables and a lot of them). Is there also a way to compile the programs that depend on mysql against mysql-4.1 while 4.0 is still installed & running (as binary packages, not-yet-merged ofcourse, but when the time is there it will be a lot faster to emerge)

 Why not "just" copy your current system to a chroot jail where you would do the update + build binary packages for quick merge on production system?

----------

## kallamej

 *den_RDC wrote:*   

> The upgrade manual says "Under certain conditions it's possible to directly upgrade to the next major version of MySQL". What are those conditions exactly? I want to upgrade using the fast but dangerous method because the safe and slow method will come with too much downtime (pretty large tables and a lot of them). Is there also a way to compile the programs that depend on mysql against mysql-4.1 while 4.0 is still installed & running (as binary packages, not-yet-merged ofcourse, but when the time is there it will be a lot faster to emerge)

 

Please have a look at the Upgrading from Version 4.0 to 4.1 section of the official MySQL 4.1 Reference Manual

----------

## anmaster

I use phpMyAdmin, Wordpress and MediaWiki. I followd the instructions. But I got an error when trying to import the data again. Something of the key length being too big at line 1402 (max length 1000 bytes). I had to downgrade again before I had time to find out what the problem was. It is a important server.

What should I do?

----------

## RockHound

 *anmaster wrote:*   

> I use phpMyAdmin, Wordpress and MediaWiki. I followd the instructions. But I got an error when trying to import the data again. Something of the key length being too big at line 1402 (max length 1000 bytes). I had to downgrade again before I had time to find out what the problem was. It is a important server.
> 
> What should I do?

 

Check your my.cnf for this setting... I believe that should fix it. I don't recall the exact param though.

Regards

----------

## langthang

 *anmaster wrote:*   

> I use phpMyAdmin, Wordpress and MediaWiki. I followd the instructions. But I got an error when trying to import the data again. Something of the key length being too big at line 1402 (max length 1000 bytes). I had to downgrade again before I had time to find out what the problem was. It is a important server.
> 
> What should I do?

 

you have an error like "ERROR 1071 (42000) at line n: Specified key was too long; max key length is 1000 bytes"

problem described in http://bugs.mysql.com/bug.php?id=4541". to "workaround" it. open the backup.sql, go to line "n", look down a few lines, insert "CHARACTER SET latin1" in the column that cause problem. for example here is my greylist database

```

CREATE TABLE `greylist` (

  `ip` char(16) NOT NULL default '',

  `sender` char(242) NOT NULL default '',

  `recipient` char(242) NOT NULL default '',

  `first` int(11) NOT NULL default '0',

  `last` int(11) NOT NULL default '0',

  `n` int(11) NOT NULL default '0',

  PRIMARY KEY  (`ip`,`sender`,`recipient`)

) TYPE=MyISAM COMMENT='greylist';

```

the "PRIMARY KEY" needs ip=16+sender=242+recipient=242=500*3=1500 bytes

so I have to change the sql to

```

CREATE TABLE `greylist` (

  `ip` char(16) NOT NULL default '',

  `sender` char(242) CHARACTER SET latin1 NOT NULL default '',

  `recipient` char(242) CHARACTER SET latin1 NOT NULL default '',

  `first` int(11) NOT NULL default '0',

  `last` int(11) NOT NULL default '0',

  `n` int(11) NOT NULL default '0',

  PRIMARY KEY  (`ip`,`sender`,`recipient`)

) TYPE=MyISAM COMMENT='greylist';

```

to keep it under 1000 bytes.

HTH

----------

## steveb

 *grimm26 wrote:*   

> However, revdep-rebuild does not pick up the fact that /usr/nagios/bin/nagios (net-analyzer/nagios-core) needs to be rebuilt.  Maybe I don't know the right option to feed revdep-rebuild to catch this one, but there is no man page for it 

 

Mybe rebuilding all packages having the mysql use flag would be a good thing:

```
equery h mysql
```

cheers

SteveB

----------

## anmaster

 *langthang wrote:*   

> 
> 
> you have an error like "ERROR 1071 (42000) at line n: Specified key was too long; max key length is 1000 bytes"
> 
> problem described in http://bugs.mysql.com/bug.php?id=4541". to "workaround" it. open the backup.sql, go to line "n", look down a few lines, insert "CHARACTER SET latin1" in the column that cause problem. for example here is my greylist database
> ...

 

It doesn't work. 

I'm not very good at SQL but it says "varchar(255) binary NOT NULL default" not "char(255) NOT NULL default". 

Should I change it? And how?

Here is the bit it fails on:

```

CREATE TABLE `cur` (

  `cur_id` int(8) unsigned NOT NULL auto_increment,

  `cur_namespace` tinyint(2) unsigned NOT NULL default '0',

  `cur_title` varchar(255) binary NOT NULL default '',

  `cur_text` mediumtext NOT NULL,

  `cur_comment` tinyblob NOT NULL,

  `cur_user` int(5) unsigned NOT NULL default '0',

  `cur_user_text` varchar(255) binary NOT NULL default '',

  `cur_timestamp` varchar(14) binary NOT NULL default '',

  `cur_restrictions` tinyblob NOT NULL,

  `cur_counter` bigint(20) unsigned NOT NULL default '0',

  `cur_is_redirect` tinyint(1) unsigned NOT NULL default '0',

  `cur_minor_edit` tinyint(1) unsigned NOT NULL default '0',

  `cur_is_new` tinyint(1) unsigned NOT NULL default '0',

  `cur_random` double unsigned NOT NULL default '0',

  `cur_touched` varchar(14) binary NOT NULL default '',

  `inverse_timestamp` varchar(14) binary NOT NULL default '',

  PRIMARY KEY  (`cur_id`),

  UNIQUE KEY `name_title` (`cur_namespace`,`cur_title`),

  KEY `cur_title` (`cur_title`(20)),

  KEY `cur_timestamp` (`cur_timestamp`),

  KEY `cur_random` (`cur_random`),

  KEY `name_title_timestamp` (`cur_namespace`,`cur_title`,`inverse_timestamp`),

  KEY `user_timestamp` (`cur_user`,`inverse_timestamp`),

  KEY `usertext_timestamp` (`cur_user_text`,`inverse_timestamp`),

  KEY `namespace_redirect_timestamp` (`cur_namespace`,`cur_is_redirect`,`cur_timestamp`),

  KEY `id_title_ns_red` (`cur_id`,`cur_title`,`cur_namespace`,`cur_is_redirect`)

) TYPE=MyISAM;

/*!40000 ALTER TABLE `cur` DISABLE KEYS */;

LOCK TABLES `cur` WRITE;

INSERT INTO `cur` VALUES (1,0,0x4D61696E5F50616765,'#REDIRECT [[Huvudsida]] {{R from alternate language}}','',2,0x41727669644E6F726C616E646572,0x3230303531303131313633373038,0x6D6F76653D7379736F703A656469743D7379736F70,55,1,0,0,0,0x3230303531303131313633373038,0x3739393438393838383336323931),(2,8,0x316D6F766564746F32,'$1 moved to $2','',0,0x4D6564696157696B692064656661756C74,0x3230303531303131313431303536,0x7379736F70,0,0,0,0,0,0x3230303531303131313431303536,0x3739393438393838383538393433),(3,8,0x316D6F766564746F325F7265646972,'$1 moved to $2 over redirect','',0,0x4D6564696157696B692064656661756C74,0x3230303531303131313431303536,0x7379736F70,0,0,0,0,0,0x3230303531303131313431303536,0x3739393438393838383538393433),(4,8,0x4D6F6E6F626F6F6B2E637373,'/* edit this file to customize the monobook skin for the entire site */','',0,0x4D6564696157696B692064656661756C74,0x3230303531303131313431303536,0x7379736F70,0,0,0,0,0,0x3230303531303131313431303536,0x3739393438393838383538393433),(5,8,0x4D6F6E6F626F6F6B2E6A73,'/* tooltips and access keys */\nta = new Object();\nta[\'pt-userpage\'] = new Array(\'.\',\'My user page\');\nta[\'pt-anonuserpage\'] = new Array(\'.\',\'The user page for the ip you\\\'re editing as\');\nta[\'pt-mytalk\'] = new Array(\'n\',\'My talk page\');\nta[\'pt-anontalk\'] = new Array(\'n\',\'Discussion about edits from this ip address\');\nta[\'pt-preferences\'] =

...

```

The bit that begins with "INSERT INTO `cur` VALUES (" is very long. After I pased it Emacs just showed ?? instead of linenumber.

----------

## AxelTerizaki

This is not entirely MySQL related, but it happened right after I upgraded to 4.1

vpopmail doesn't seem to work anymore with qmail somehow O_o.

It authentificates quite well with courier-imap though, no problems logging and reading IMAP folders, but with qmail, I just get those in the logs:

```
Oct 20 17:39:10 twilight vpopmail[12142]: vchkpw-smtp: vpopmail user not found xxxx@xxxx-xxxx.net:123.123.123.123

Oct 20 17:39:10 twilight vpopmail[12142]: vchkpw: can't write MySQL logs
```

Anyone have any clues on hwo to fix this? I can login with the vpopmail user fine under MySQL, and of course, I recompiled vpopmail, since for example, vuseradd works fine (I can add users to my virtual domains this way)

----------

## langthang

 *anmaster wrote:*   

> 
> 
> It doesn't work. 
> 
> I'm not very good at SQL but it says "varchar(255) binary NOT NULL default" not "char(255) NOT NULL default". 
> ...

 

tried the above with my mysql, it doesn't choke.

 *Quote:*   

> 
> 
> ```
> 
> /*!40000 ALTER TABLE `cur` DISABLE KEYS */;
> ...

 

tried above records, still good.

 *Quote:*   

> 
> 
> ```
> 
> (5,8,0x4D6F6E6F626F6F6B2E6A73,'/* tooltips and access keys */\nta = new Object();\nta[\'pt-userpage\'] = new Array(\'.\',\'My user page\');\nta[\'pt-anonuserpage\'] = new Array(\'.\',\'The user page for the ip you\\\'re editing as\');\nta[\'pt-mytalk\'] = new Array(\'n\',\'My talk page\');\nta[\'pt-anontalk\'] = new Array(\'n\',\'Discussion about edits from this ip address\');\nta[\'pt-preferences\'] =
> ...

 

above is incomplete record, so don't know. 

 *steveb wrote:*   

> 
> 
> ```
> equery h mysql
> ```
> ...

 

good idea but don't forget, there are ebuilds support mysql by default (without mysql USE flag) if "postgres" is mising in your USE flag. so check again with 

```
equery h -i postgres
```

----------

## rusxakep

mysqldump work it incorrect now. My tables have ?????????????????? and not text in cp1251 charset  :Sad: 

I ran 4.0 server on another server and copy&paste import/export my data (is not big data)

----------

## anmaster

 *langthang wrote:*   

> 
> 
> above is incomplete record, so don't know. 
> 
> 

 

I can't post the incomplete bit. It is about 2 MB! It is ALL system messages for MediaWiki. 

I will go on using MySQL 4.0.  :Sad: 

Or can you change the default charset or the maximum key length?   :Question:  (And I have read the manual.)

I just want the database to work. I don't care for UTF-8! The swedish chars were working perfectly!

And why doesn't it say anything in the upgrading guide?

----------

## Ynusis

i upgraded from 4.0.25-r2 to 4.1.14.

i did exactly what the upgrade guidline told me to do.

but:

```

/etc/init.d/mysql start

 * Starting mysqld (/etc/mysql/my.cnf) ...

..... * MySQL NOT started, proceding anyway

```

is there a chance to get mysql working ?

my my.cnf:

```

# /etc/mysql/my.cnf: The global mysql configuration file.

# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.1,v 1.2 2005/07/26 17:14:23 vivo Exp $

# The following options will be passed to all MySQL clients

[client]

#password               = your_password

port                  = 3306

socket                  = /var/run/mysqld/mysqld.sock

[mysql]

character-sets-dir=latin1

default-character-set=latin1

[mysqladmin]

character-sets-dir=latin1

default-character-set=latin1

[mysqlcheck]

character-sets-dir=latin1

default-character-set=latin1

[mysqldump]

character-sets-dir=latin1

default-character-set=latin1

[mysqlimport]

character-sets-dir=latin1

default-character-set=latin1

[mysqlshow]

character-sets-dir=latin1

default-character-set=latin1

[myisamchk]

character-sets-dir=latin1

[myisampack]

character-sets-dir=latin1

# use [safe_mysqld] with mysql-3

[mysqld_safe]

err-log                  = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.

[mysqld]

character-set-server      = latin1

default-character-set      = latin1

user                   = mysql

port                   = 3306

socket                   = /var/run/mysqld/mysqld.sock

pid-file                = /var/run/mysqld/mysqld.pid

log-error                = /var/log/mysql/mysqld.err

basedir                = /usr

datadir                = /var/lib/mysql

skip-locking

skip-innodb

key_buffer                = 16M

max_allowed_packet          = 1M

table_cache             = 64

sort_buffer_size          = 512K

net_buffer_length          = 8K

read_buffer_size          = 256K

read_rnd_buffer_size       = 512K

myisam_sort_buffer_size    = 8M

language                = /usr/share/mysql/english

#security:

#using "localhost" in connects use sockets by default

#skip-networking

bind-address            = 127.0.0.1

log-bin

server-id                = 1

# Point the following paths to different dedicated disks

tmpdir                   = /tmp/

#log-update             = /path-to-dedicated-directory/hostname

# you need debug use flag enabled to use this ones.

# if needed uncomment them, start the server and issue 

# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace

# this will show you *exactly* what's appening in your server ;)

#log                  = /tmp/mysqld.sql

#gdb

#debug                  = d:t:i:o,/tmp/mysqld.trace

#one-thread

# Uncomment the following if you are using BDB tables

#bdb_cache_size            = 4M

#bdb_max_lock            = 10000

# The following is the InnoDB configuration

# if you wish to disable innodb instead

# uncomment just the next line

#skip-innodb

#

# the rest of the innodb config follows:

# don't eat too much memory, we're trying to be safe on 64Mb boxes.

# you might want to bump this up a bit on boxes with more RAM

innodb_buffer_pool_size      = 16M

# this is the default, increase if you have lots of tables

innodb_additional_mem_pool_size   = 2M

#

# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(

# and upstream wants things to be under /var/lib/mysql/, so that's the route

# we have to take for the moment

#innodb_data_home_dir      = /var/lib/mysql/

#innodb_log_arch_dir      = /var/lib/mysql/

#innodb_log_group_home_dir   = /var/lib/mysql/

# you may wish to change this size to be more suitable for your system

# the max is there to avoid run-away growth on your machine

innodb_data_file_path      = ibdata1:10M:autoextend

# we keep this at around 25% of of innodb_buffer_pool_size

# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)

innodb_log_file_size      = 5M

# this is the default, increase if you have very large transactions.

innodb_log_buffer_size      = 8M

# this is the default, and won't hurt you.

# you shouldn't need to tweak it.

set-variable            = innodb_log_files_in_group=2

# see the innodb config docs, the other options are not always safe

innodb_flush_log_at_trx_commit   = 1

innodb_lock_wait_timeout   = 50

[mysqldump]

quick

max_allowed_packet          = 16M

[mysql]

# Remove the next comment character if you are not familiar with SQL

#safe-updates

[isamchk]

key_buffer                = 20M

sort_buffer_size          = 20M

read_buffer             = 2M

write_buffer             = 2M

[myisamchk]

key_buffer                = 20M

sort_buffer_size          = 20M

read_buffer             = 2M

write_buffer             = 2M

[mysqlhotcopy]

interactive-timeout

#vim: set tabstop=4 :

#vim: set shiftwidth=4 :

```

----------

## Valour

Man, this is scary. I don't want to have to spend another whole day reinstalling, reconfiguring, swearing at things, and in general having a very bad time like I did when I upgraded Postfix and, more recently, Apache.

Is there any hope of this MySQL situation becoming less of a disaster for Gentoo users? Are there any compelling reasons to upgrade? I skimmed the changes list, but didn't see anything that would make it worth the hassle.

-Jem

----------

## chrismear

 *Ynusis wrote:*   

> i upgraded from 4.0.25-r2 to 4.1.14.
> 
> i did exactly what the upgrade guidline told me to do.
> 
> but:
> ...

 

I had this exact same problem. On my machine, I fixed it by manually creating the /var/log/mysql/ directory that MySQL expects to find there. Something like:

```
# cd /var/log

# mkdir mysql

# chown mysql:mysql mysql

# chmod 750 mysql
```

----------

## plastix

On my upgrade I ran into an error with mysqldump:

```
mysqldump: Got error: 1105: Unknown error when doing refresh
```

I fixed this by issueing :

```
# mysqldump \

  -uroot \

  -p$PASSWORD \

  -hlocalhost \

  --all-databases \

  --all \

  --opt \

  --allow-keywords \

  --hex-blob \

  --master-data \

  --max_allowed_packet=16M \

  --quote-names \

  --result-file=BACKUP_MYSQL_4.0.SQL
```

(Basically I removed the --flush-logs option)  Hope this helps anyone who has a similar problem.

----------

## p_ansell

In the following section of the upgrade guide,

```

Now configure the newly installed version of MySQL and restart the daemon:

Code Listing 3.4: Configure MySQL 4.1 base setup

# ebuild /var/db/pkg/dev-db/mysql-4.1.<micro_version>/mysql-4.1.<micro_version>.ebuild config

# /etc/init.d/mysql start

```

```

# ebuild /var/db/pkg/dev-db/mysql-4.1.<micro_version>/mysql-4.1.<micro_version>.ebuild config

```

needs to be replaced with the following,

```

emerge --config mysql

```

See bug 109302

----------

## demitrix

got everything working except phpmyadmin, i cant login it just tells me my passwords are bad.

edit:oops, simple apache restart and its all good  :Very Happy:  <3 Gentoo

----------

## xming

If you are using innodb + FK contraint then you should the following method to restore our data:

```

mysql -u root -p 

<type you passowrd here>

set foreign_key_checks=0;

source BACKUP_MYSQL_4.0.SQL;

quit

```

I am still testing my apps, so far these are working

- phpMyAdmin

- dbmail

- phpRecipeBook

----------

## Danathan

 *Valour wrote:*   

> Man, this is scary. I don't want to have to spend another whole day reinstalling, reconfiguring, swearing at things, and in general having a very bad time like I did when I upgraded Postfix and, more recently, Apache.

 

For me, at least, this was a much easier upgrade than the apache upgrade.  Everything in 4.1 is basically as it was in 4.0 -- the main hassle here is just that this involves significant downtime due to all the compiling and reloading of data.

 *Quote:*   

> Are there any compelling reasons to upgrade? I skimmed the changes list, but didn't see anything that would make it worth the hassle.

 

The big change for me is the addition of subselects.  A better changelog is here: http://dev.mysql.com/doc/refman/4.1/en/news-4-1-x.html

If it doesn't seem worth it, just mask the newer releases.  I suspect a bunch of people will, and I also suspect that Gentoo will continue to support the 4.0.X line, just as they've continued to support the 3.23.X line.

----------

## syncmaster

hi,

i tried to import the typo3 sql databases into the new mysql server, but it fails, cause all german umlauts (äöü) gets broken.   :Crying or Very sad:  . I have also several wordpress installations. I don't know, how i can fix this issue.

----------

## Robert S

I've just spent much of the morning on the upgrade.   Much worse than apache2 which went without much of a hitch.   Had problems recreating my database from the mysqldump - it didn't like some of the records in the key fields.  I had to re-emerge mod_php (for some reason this got missed in revdep-rebuild).  I also had to uninstall and reinstall phpmyadmin - I had problems with re-assigning the pma password.  This was compounded by the fact that phpmyadmin needed a security upgrade.

All seems to be OK now.

----------

## WladyX

My upgrade went pretty good on three gentoo systems  :Smile: 

----------

## BastianBalthazarBux

My apologies for every issue you may have encountered, following a short resume of what I can remember.

use 

```
revdep-rebuild --library=libmysqlclient.so.12
```

instead of a plain revdep-rebuild, will be documented soon

for a mysql-4.1 ==> 5.0 upgrade

use 

```
revdep-rebuild --library=libmysqlclient.so.14
```

There has been a (short) period of time where /var/log/mysql was not created, if it's missing please do:

```

mkdir "/var/log/mysql"

touch /var/log/mysql/mysql.{log,err}

chmod 0660 /var/log/mysql/mysql.{log,err}

```

more in depth 1000 byte key issue:

https://bugs.gentoo.org/show_bug.cgi?id=109960

The mysql-herd is intentioned in maintaining as long as possible every version of MySQL, avoid 4.1 upgrades is as easy as 

```
echo '>=dev-db/mysql-4.1' >> /etc/portage/package.mask
```

as far as I know we still have working mysql-3.23.58 ebuild .

4.0.26 is already there and 4.0.27 will be, when out.

P.S. as you can see from the number of my post I'm not a frequent forum poster/reader, bugs and mail reach me much faster.

Regards, 

Francesco

----------

## Robelix

 *plastix wrote:*   

> On my upgrade I ran into an error with mysqldump:
> 
> ```
> mysqldump: Got error: 1105: Unknown error when doing refresh
> ```
> ...

 

I had this error on one box and tried it without flush-logs. No more errors, but I was missing at least one database after importing   :Surprised: 

So I stepped back to 4.0 for now.

----------

## xming

MySQL 5.0.15 declared stable, do we have to through this again?  :Smile: 

xming

----------

## Grexe

I thought I'd take the big step now that 5.0 is out and - success:) - the excellent howto was all I needed.

revdep-rebuild had some problems with a stale qt-package that it did not find anymore, so I manually emerged the necessary packages (and took fresh versions along the way).

However I also got the "MySQL not started. Proceeding anyway"-message, but only on first start.

Log-files had the correct user- and group-permissions (mysql:mysql).

Running at 5.0.15 now, without problems so far (only did some rudimentary testing with mediawiki).

Thanks for all the infos in this Thread!

----------

## nl0pvm

I did the upgrade exactly according to the manual but i ended up with this problem:

```
Warning: Unable to load '//usr/share/zoneinfo/zone.tab' as time zone. Skipping it.

.051127 13:42:01 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

051127 13:42:01 [ERROR] Aborting

051127 13:42:01 [Note] //usr/sbin/mysqld: Shutdown complete

....ERROR 2002 (HY000): Can't connect to local MySQL server through socket '//var/run/mysqld/mysqld.sock' (2)

 * Loading "zoneinfo" this step may require few seconds

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '//var/run/mysqld/mysqld.sock' (2)

cat: //var/run/mysqld/mysqld.pid: No such file or directory

kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]

 * done

```

when i tried to run mysql I got this error:

```
bruce pveerman # /etc/init.d/mysql start

 * Caching service dependencies ...                                                                                                                     [ ok ]

 * ERROR:  "mysql" does not have a start function.

```

which is not a big suprise as my /etc/init.d/mysql only contains the following:

```
bruce pveerman # less /etc/init.d/mysql

#!/sbin/runscript

# Copyright 1999-2004 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

```

What should i do now? 

1. uninstall mysql 4.1 then redo the whole procedure?

2. uninstall 4.1 install 4.0 rebuild DB and then do the whole procedure again?

3. rollback to 4.0 and forget upgrading my complete life.   :Sad: 

4. switch distribution?   :Twisted Evil: 

----------

## bonbons

 *nl0pvm wrote:*   

> when i tried to run mysql I got this error:
> 
> ```
> bruce pveerman # /etc/init.d/mysql start
> 
> ...

 Hard to say what exactly is wrong...

Are you sure your timezone configuration is correct and working?

For the empty init script, you could just look at the mysql ebuild and manually copy the appropriate file from /usr/portage/dev-db/mysql/files/ to /etc/init.d/.

What useflags are you using for mysql?

----------

## nl0pvm

This is already some days ago and this is what i remember:

My use flags:

```
-cups -3ds ansi apache2 bash-completion bzlib -doc innodb mailwrapper mime php serial session sftplogging soap sockets vim -gtk -gnome -qt -X -xv
```

and during the emerge i can remember some vague warnings about a very weard timezone in asia or something like that.

I solved the problem bij emerge -C and a second try :S 

Then i ended up with some other problems but those i could work around.

----------

## schachti

I'm having problems with mysqldump - it doesn't dump the data:

```

web ~ # mysqldump -uroot -p$PASSWORD -hlocalhost --all-databases --all --opt --allow-keywords --flush-logs --hex-blob --master-data --max_allowed_packet=16M --quote-names --result-file=BACKUP_MYSQL_4.0.SQL

Enter password:

web ~ # cat BACKUP_MYSQL_4.0.SQL

-- MySQL dump 9.11

--

-- Host: localhost    Database:

-- ------------------------------------------------------

-- Server version       4.0.25

--

-- Current Database: mysql

--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql`;

USE mysql;

--

-- Current Database: phpBB

--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `phpBB`;

USE phpBB;

--

-- Current Database: test

--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test`;

USE test;

```

No data is put into the dump...  :Embarassed: 

----------

## SiLvEr40

Hello,

I am gentoo newbie   :Embarassed:  and i have a problem with : 

emerge =dev-db/mysql , 

MySql return an error  

```

 * MySQL does not support building statically with SSL support

!!! ERROR: dev-db/mysql-5.0.17 failed.

!!! Function src_unpack, Line 209, Exitcode 0

!!! MySQL does not support building statically with SSL support

!!! If you need support, post the topmost build error, NOT this status message.

```

What should I do?

EDIT : I solve the problem !

I remove static flag from /etc/make.conf   :Embarassed: 

----------

## Spida

[quote]/etc/init.d/mysql start 

 * Starting mysqld (/etc/mysql/my.cnf) ... 

..... * MySQL NOT started, proceding anyway[/quote]

chown mysql:mysql /var/run/mysqld helps sometimes, too

----------

## [clu]

can't insert cyrillic letters - they appears as question marks ('?')...

----------

## eagle_cz

 *plastix wrote:*   

> On my upgrade I ran into an error with mysqldump:
> 
> (Basically I removed the --flush-logs option)  Hope this helps anyone who has a similar problem.

 

It did , thx a lot

----------

## zeek

Perhaps this thread from Oct 2005 doesn't need to be stickied anymore?  Are these forums still being actively maintained?

mysql-4.0 is unsupported by Mysql AB and anyone needing help to upgrade to 4.1 probably already got it.

----------

## think4urs11

removed sticky

----------

