You are not logged in.

#1 2011-02-07 16:45:39

off220
Member
Registered: 2010-04-01
Posts: 92

Mysql upgrade issue

after upgrade i rebooted and ran mysql_upgrade as written on the main page. here's what I got:
mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
I  myself do not use mysql. It's installed as kde4 dependancy. Do i need to run mysql_upgrade?

Last edited by off220 (2011-02-07 17:04:48)

Offline

#2 2011-02-07 18:41:35

SteveK
Member
Registered: 2010-06-11
Posts: 80

Re: Mysql upgrade issue

Hi,  Did you start the mysql server?
Do as root:

# /etc/rc.d/mysqld start

Then run the upgrade, again as root.

# mysql_upgrade

Offline

#3 2011-02-07 19:46:02

Malakin
Member
From: Chile
Registered: 2007-04-29
Posts: 36
Website

Re: Mysql upgrade issue

Try restarting KDE before running mysql_upgrade.

Offline

#4 2011-02-07 20:56:54

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Mysql upgrade issue

you might want to pass -u user -p password


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2011-02-07 21:16:36

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi
Same problem with me
cat /var/lib/mysql/hostname.err gives me

/usr/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110207 23:16:14 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
110207 23:16:14 mysqld_safe mysqld from pid file /var/lib/mysql/hostname.pid ended

What to do?

Serge

Offline

#6 2011-02-07 21:35:03

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Mysql upgrade issue

Start mysqld:

# /etc/rc.d/mysqld start

Upgrade mysql:

# mysql-upgrade -u <username that owns base> -p

"#" indicates root.

Offline

#7 2011-02-07 21:42:29

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

impossible to start the daemon : FAILED

Serge

Offline

#8 2011-02-07 21:46:02

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Mysql upgrade issue

Is it already running?

ps -ef | grep mysqld

Offline

#9 2011-02-07 21:56:01

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

no it is not running....

Serge

Offline

#10 2011-02-07 21:59:15

Regenwald
Member
Registered: 2009-05-24
Posts: 6

Re: Mysql upgrade issue

i've got the same problem... can't start mysqld, just got a "failed".
my hostname.err
110207 22:47:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/
/usr/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110207 22:47:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.5
110207 22:47:03  InnoDB: Initializing buffer pool, size = 128.0M
110207 22:47:04  InnoDB: Completed initialization of buffer pool
110207 22:47:04  InnoDB: highest supported file format is Barracuda.
InnoDB: 127 rollback segment(s) active.
110207 22:47:04  InnoDB: 1.1.4 started; log sequence number 47041
110207 22:47:04 [Note] Recovering after a crash using mysql-bin
110207 22:47:04 [Note] Starting crash recovery...
110207 22:47:04 [Note] Crash recovery finished.
110207 22:47:04 [ERROR] /usr/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110207 22:47:04 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
110207 22:47:04 mysqld_safe mysqld from pid file /var/lib/mysql//joni-desktop.pid ended

seems that the deamon says that i should run mysql_upgarde. which is impossible due to not have a mysqld running..
any hints?

Offline

#11 2011-02-07 22:00:39

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Mysql upgrade issue

offfffffff

why do you guys like to ignore .pacnew files? YOU are supposed to diff your actually config and .pacnew and merge the changes!

Last edited by wonder (2011-02-07 22:01:03)


Give what you have. To someone, it may be better than you dare to think.

Offline

#12 2011-02-07 22:07:08

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi

I am sorry but i cannot find any pacnew files for mysql

Offline

#13 2011-02-07 23:37:17

subatomic
Member
From: Berlin
Registered: 2005-06-26
Posts: 180

Re: Mysql upgrade issue

there is no .pacnew for mysql!

I had to delete my.cnf to get the daemon to start.

Then I ran mysql_update but had a connection fail due to passwords.
After I got that straight there were a few syntax errors where mysql said the files were corrupted
at which point I said "*****!" and then I downgraded immediately.

Last edited by subatomic (2011-02-07 23:38:18)

Offline

#14 2011-02-08 13:28:17

alexanderrv
Member
Registered: 2011-02-08
Posts: 2

Re: Mysql upgrade issue

my.cnf.pacnew is, indeed, there. Although I must admit I did not expect there to be one; either there were no notifications by pacman about new config files, or there were so many updates for me I missed it scrolling by.

Taking a diff between my current cnf and new one, here are the changes you need to make for [mysqld] section:
skip-locking -> skip-external-locking
key_buffer -> key_buffer_size
table_cache -> table_open_cache

#new configs added and are optional.
read_buffer_size = 256K
read_rnd_buffer_size = 512K

Once you make your changes, (re)start the deamon and don't forget to do mysql_upgrade as root, since it wants to write some files to /var/lib/mysql/

Offline

#15 2011-02-08 14:57:41

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi

Today has been released an update : 5.5.9-1

Still no .pacnew file
Still impossible to start the daemon and to do anything.

Except these lines

#new configs added and are optional.
read_buffer_size = 256K
read_rnd_buffer_size = 512K

my my.conf file has already:

skip-external-locking
key_buffer_size
table_open_cache

So Alexanderrv, you are lucky

Serge

Offline

#16 2011-02-08 15:49:14

off220
Member
Registered: 2010-04-01
Posts: 92

Re: Mysql upgrade issue

same for me. nothing changed with update sad
Maybe pacman -Rd mysql, clear all configs(who knows where they are?) and start from beginning?

Last edited by off220 (2011-02-08 15:50:55)

Offline

#17 2011-02-08 16:12:59

alexanderrv
Member
Registered: 2011-02-08
Posts: 2

Re: Mysql upgrade issue

csergec wrote:

So Alexanderrv, you are lucky

That is the strangest thing.... How could it possibly work for me alone after I made those changes?  Would love to know how this gets resolved.

off220 wrote:

Did you try removing my.cnf like subatomic did?  Also by default MySQL stores databases in /var/lib/mysql. Are you considering backing that up or do the entire setup from scratch?

Offline

#18 2011-02-08 16:17:34

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

BTW when i do a:
mysqld --user=mysql --datadir=/var/lib/mysql

I get :

mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110208 18:14:01 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110208 18:14:01 InnoDB: The InnoDB memory heap is disabled
110208 18:14:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
110208 18:14:01 InnoDB: Compressed tables use zlib 1.2.5
110208 18:14:01 InnoDB: Initializing buffer pool, size = 128.0M
110208 18:14:01 InnoDB: Completed initialization of buffer pool
110208 18:14:01 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 49439
110208 18:14:01  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1595675
110208 18:14:01  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
110208 18:14:02  InnoDB: Waiting for the background threads to start
110208 18:14:03 InnoDB: 1.1.5 started; log sequence number 1595675
110208 18:14:03 [Note] Recovering after a crash using mysql-bin
110208 18:14:03 [Note] Starting crash recovery...
110208 18:14:03 [Note] Crash recovery finished.
110208 18:14:03 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
110208 18:14:03 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)

and if I try do to mysql_upgrade
I get :

Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

Serge

Offline

#19 2011-02-08 16:26:42

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: Mysql upgrade issue

Serge:
There is a link in Arch Linux - News Mysql announcement on the front page: http://dev.mysql.com/doc/refman/5.5/en/ … eries.html

It specifically mentions InnoDB. It might be helpful.

Here's the section:

Configuration Changes

    *

      Incompatible change: The InnoDB Plugin is included in MySQL 5.5 releases. It becomes the built-in version of InnoDB in MySQL Server, replacing the version previously included as the built-in InnoDB engine. InnoDB Plugin is also available in MySQL 5.1 as of 5.1.38, but it is an optional storage engine that must be enabled explicitly using two server options:

      [mysqld]
      ignore-builtin-innodb
      plugin-load=innodb=ha_innodb_plugin.so

      If you were using InnoDB Plugin in MySQL 5.1 by means of those options, you must remove them after an upgrade to 5.5 or the server will fail to start.

      In addition, in InnoDB Plugin, the innodb_file_io_threads system variable has been removed and replaced with innodb_read_io_threads and innodb_write_io_threads. If you upgrade from MySQL 5.1 to MySQL 5.5 and previously explicitly set innodb_file_io_threads at server startup, you must change your configuration. Either remove any reference to innodb_file_io_threads or replace it with references to innodb_read_io_threads and innodb_write_io_threads.

Offline

#20 2011-02-08 17:01:19

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: Mysql upgrade issue

I had no problem upgrading mysql today however I must admit mysql wasn't running:

[2011-02-08 15:10] warning: /etc/mysql/my.cnf installed as /etc/mysql/my.cnf.pacnew
[2011-02-08 15:10]  >> 
[2011-02-08 15:10]  >> Major version update. Consider restart the service, and then running mysql_upgrade after it.
[2011-02-08 15:10]  >> 
[2011-02-08 15:10] upgraded mysql (5.1.54-1 -> 5.5.9-1)

I updated my.cnf, started mysqld, then mysql_upgrade. Everything seems to work fine.

Offline

#21 2011-02-08 17:46:11

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi Siriusb

For those like me who did not get any /etc/mysql/my.cnf.pacnew
can you print it here?

Thank you

Offline

#22 2011-02-08 17:53:47

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi Ashren

Actually I do not use innoDB

For the practise, I added the line to the config and I got

110208 19:57:06 [ERROR] Can't open shared library '/usr/usr/lib/mysql/plugin/ha_innodb_plugin.so' (errno: 0 cannot open shared object file: No such file or directory)
110208 19:57:06 [ERROR] Couldn't load plugin named 'innodb' with soname 'ha_innodb_plugin.so'.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110208 19:57:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110208 19:57:06 [ERROR] Unknown/unsupported storage engine: InnoDB
110208 19:57:06 [ERROR] Aborting

Serge

Offline

#23 2011-02-08 19:23:14

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: Mysql upgrade issue

csergec,
here it is:

# MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password    = your_password
port        = 3306
socket        = /var/run/mysqld/mysqld.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock
datadir        = /var/lib/mysql
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
skip-networking

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id    = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Offline

#24 2011-02-08 19:35:36

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Mysql upgrade issue

Hi Siriusb

Thank you for the file.
But it still does not work.
Apparently the problem is somewhere else.
I still get the same errors as shown before

Serge

Offline

#25 2011-02-08 19:39:18

Regenwald
Member
Registered: 2009-05-24
Posts: 6

Re: Mysql upgrade issue

hm, deleting my my.cnf, pacman -Rd mysql & reinstall solved my issues..

Offline

Board footer

Powered by FluxBB