Topic: Can't get MYSQL to start

I have been trying to get MYSQL working again the last 5 hours...:(
Sorry if i'm unclear in this post, i have been working to fix this and to much hours behind the computer..

Ok so here is my story:

i needed a update from Remi for php-mbstrings . But without watching i also updated mysql to Remi version.. (where it was before i guess not a Remi version)

No problem, i don't have anything running on the server now, not any productive sites.
At that moment mysql would NOT start because i got this message (simular):
[ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 472 error messages,
but it should contain at least 630 error messages.
Check that the above file is the right version for this program!
/usr/libexec/mysqld: Unknown error 1146
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: Started; log sequence number 0 46409
[ERROR] Aborting

I read in a other post:
mysql-libs was the correct version, so the only fix was to overwrite /usr/share/mysql/* with the files from 5.1.33 and manually re-run mysql_install_db.


So i did the following:

yum remove mysql mysql-devel mysql-server

i deleted /usr/share/mysql/
and deleted /var/lib/mysql/
and i also delete etc/my.conf (after different failures)

Than:
yum install mysql mysql-devel mysql-server


Now when i launch MYSQL i get the following error:
Failed to start database :
Initializing MySQL database:  Installing MySQL system tables...
110118  7:09:22 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys'
110118  7:09:22 [ERROR] Aborting

110118  7:09:22 [Note]

Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/libexec/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

[FAILED]



When i browse to /usr/share/mysql  there is no /english/errmsg.sys or no english dir
So logical it does not work.. because that file or files are not there? What am i doing wrong?

Re: Can't get MYSQL to start

please, post the full ouput of :

rpm -qa mysql\*
rpm -Va mysql\*

P.S : please also post, distro, version and arch.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Ok it seems that i deleted

/usr/shared/mysql

but i did not reinstall mysql-libs-5.1.54-1.el5.remi  after i deleted this directory
(but yum tells me it's installed but i deleted the directory /usr/shared/mysql)

Took me more than 6 hours to realise! That i of course needed these libs

yum install mysql-libs  (after is did yum remove mysql-libs)

after this i needed to delete
/var/lib/mysql/

and started mysql smile

Re: Can't get MYSQL to start

I have this issue. Mysql won't start. I follow the instructions from below link to install mysql and php from remi repo.

http://www.if-not-true-then-false.com/2 … -hat-rhel/

The error msg I am getting is as follows:
1. I tried this after successful installations:

didim: /usr/share/mysql> service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
didim: /usr/share/mysql>

2. Tried this after:
****************************************************
/usr/share/mysql> /usr/libexec/mysqld --skip-grant &
[1] 3034
/usr/share/mysql> 110128  5:08:23 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
110128  5:08:23 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110128  5:08:23  InnoDB: Using Linux native AIO
110128  5:08:23  InnoDB: Initializing buffer pool, size = 128.0M
110128  5:08:23  InnoDB: Completed initialization of buffer pool
110128  5:08:23  InnoDB: highest supported file format is Barracuda.
110128  5:08:23  InnoDB: 1.1.4 started; log sequence number 1595675
110128  5:08:23 [ERROR] Aborting

110128  5:08:23  InnoDB: Starting shutdown...
110128  5:08:23  InnoDB: Shutdown completed; log sequence number 1595675
110128  5:08:23 [Note]


3.Here is an output of my installed packages:
didim: /usr/share/mysql> yum list installed | grep mysql
compat-mysql51.x86_64                     5.1.54-1.el5.remi            installed
mysql.x86_64                              5.5.8-1.el5.remi             installed
mysql-devel.x86_64                        5.5.8-1.el5.remi             installed
mysql-libs.x86_64                         5.5.8-1.el5.remi             installed
mysql-server.x86_64                       5.5.8-1.el5.remi             installed
php-mysql.x86_64                          5.3.5-1.el5.remi.1           installed

didim: /usr/share/mysql> yum list installed | grep php
php.x86_64                                5.3.5-1.el5.remi.1           installed
php-cli.x86_64                            5.3.5-1.el5.remi.1           installed
php-common.x86_64                         5.3.5-1.el5.remi.1           installed
php-gd.x86_64                             5.3.5-1.el5.remi.1           installed
php-mbstring.x86_64                       5.3.5-1.el5.remi.1           installed
php-mcrypt.x86_64                         5.3.5-1.el5.remi.1           installed
php-mysql.x86_64                          5.3.5-1.el5.remi.1           installed
php-pdo.x86_64                            5.3.5-1.el5.remi.1           installed
phpMyAdmin.noarch                         3.3.9-1.el5.remi             installed


Remi: What else do I need to do here to get it working?
There was an old mysql that I removed before this installation. Would that be the cause of this. This is brand new installation on CENTOS 5.5. Any help will be greatly appreciated? (Note I tried a lot of different things over the last 5 hrs from the other posts etc. No luck so far.

Re: Can't get MYSQL to start

If you have no data, try removing the old database :

service mysqld stop
rm -rf /var/lib/mysql/*
service mysqld start

But : Can't find messagefile /usr/share/mysql/errmsg.sys
So check the installed package

rpm -Va mysql\*

Instead of "/usr/libexec/mysqld --skip-grant", you could try "service mysqld startsos"

+

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

6 (edited by Breakers 2011-01-28 16:36:13)

Re: Can't get MYSQL to start

Ok here is what I got. After running your suggestions:


didim: /usr/share/mysql> service mysqld stop
Stopping mysqld:                                           [  OK  ]
didim: /usr/share/mysql> rm -rf /var/lib/mysql/*
didim: /usr/share/mysql> service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
110128  5:25:53 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
110128  5:25:53 [ERROR] Aborting

110128  5:25:53 [Note]

Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/libexec/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!

                                                           [FAILED]
didim: /usr/share/mysql> rpm -Va mysql\*
S.5....T  c /etc/my.cnf
missing     /usr/lib64/mysql/libmysqlclient_r.so.161
missing     /usr/lib64/mysql/libmysqlclient_r.so.161.0.0
missing     /usr/share/mysql/charsets
missing     /usr/share/mysql/charsets/Index.xml
missing     /usr/share/mysql/charsets/README
missing     /usr/share/mysql/charsets/armscii8.xml
missing     /usr/share/mysql/charsets/ascii.xml
missing     /usr/share/mysql/charsets/cp1250.xml
missing     /usr/share/mysql/charsets/cp1251.xml
missing     /usr/share/mysql/charsets/cp1256.xml
missing     /usr/share/mysql/charsets/cp1257.xml
missing     /usr/share/mysql/charsets/cp850.xml
missing     /usr/share/mysql/charsets/cp852.xml
missing     /usr/share/mysql/charsets/cp866.xml
missing     /usr/share/mysql/charsets/dec8.xml
missing     /usr/share/mysql/charsets/geostd8.xml
missing     /usr/share/mysql/charsets/greek.xml
missing     /usr/share/mysql/charsets/hebrew.xml
missing     /usr/share/mysql/charsets/hp8.xml
missing     /usr/share/mysql/charsets/keybcs2.xml
missing     /usr/share/mysql/charsets/koi8r.xml
missing     /usr/share/mysql/charsets/koi8u.xml
missing     /usr/share/mysql/charsets/latin1.xml
missing     /usr/share/mysql/charsets/latin2.xml
missing     /usr/share/mysql/charsets/latin5.xml
missing     /usr/share/mysql/charsets/latin7.xml
missing     /usr/share/mysql/charsets/macce.xml
missing     /usr/share/mysql/charsets/macroman.xml
missing     /usr/share/mysql/charsets/swe7.xml
missing     /usr/share/mysql/czech
missing     /usr/share/mysql/czech/errmsg.sys
missing     /usr/share/mysql/danish
missing     /usr/share/mysql/danish/errmsg.sys
missing     /usr/share/mysql/dutch
missing     /usr/share/mysql/dutch/errmsg.sys
missing     /usr/share/mysql/english
missing     /usr/share/mysql/english/errmsg.sys
missing     /usr/share/mysql/estonian
missing     /usr/share/mysql/estonian/errmsg.sys
missing     /usr/share/mysql/french
missing     /usr/share/mysql/french/errmsg.sys
missing     /usr/share/mysql/german
missing     /usr/share/mysql/german/errmsg.sys
missing     /usr/share/mysql/greek
missing     /usr/share/mysql/greek/errmsg.sys
missing     /usr/share/mysql/hungarian
missing     /usr/share/mysql/hungarian/errmsg.sys
missing     /usr/share/mysql/italian
missing     /usr/share/mysql/italian/errmsg.sys
missing     /usr/share/mysql/japanese
missing     /usr/share/mysql/japanese/errmsg.sys
missing     /usr/share/mysql/korean
missing     /usr/share/mysql/korean/errmsg.sys
missing     /usr/share/mysql/norwegian
missing     /usr/share/mysql/norwegian-ny
missing     /usr/share/mysql/norwegian-ny/errmsg.sys
missing     /usr/share/mysql/norwegian/errmsg.sys
missing     /usr/share/mysql/polish
missing     /usr/share/mysql/polish/errmsg.sys
missing     /usr/share/mysql/portuguese
missing     /usr/share/mysql/portuguese/errmsg.sys
missing     /usr/share/mysql/romanian
missing     /usr/share/mysql/romanian/errmsg.sys
missing     /usr/share/mysql/russian
missing     /usr/share/mysql/russian/errmsg.sys
missing     /usr/share/mysql/serbian
missing     /usr/share/mysql/serbian/errmsg.sys
missing     /usr/share/mysql/slovak
missing     /usr/share/mysql/slovak/errmsg.sys
missing     /usr/share/mysql/spanish
missing     /usr/share/mysql/spanish/errmsg.sys
missing     /usr/share/mysql/swedish
missing     /usr/share/mysql/swedish/errmsg.sys
missing     /usr/share/mysql/ukrainian
missing     /usr/share/mysql/ukrainian/errmsg.sys

didim: /usr/share/mysql> service mysqld startsos
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
didim: /usr/share/mysql>

Re: Can't get MYSQL to start

Is there a reason why these files would be missing when I do a fresh install? Should I remove and reinstall mysql from your repo.

Re: Can't get MYSQL to start

Yes try to reinstall

yum --enablerepo=remi,remi-test reinstall mysql-libs
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Remi, thank you so much.  That did it.

Quick question, before I ran the service mysqld startsos command,

I tried the following once more and I got all bunch of error messages:

didim: /> /usr/libexec/mysqld --skip-grant &
[1] 4127
didim: /> 110128  5:45:07 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110128  5:45:07  InnoDB: Using Linux native AIO
110128  5:45:07  InnoDB: Initializing buffer pool, size = 128.0M
110128  5:45:07  InnoDB: Completed initialization of buffer pool
110128  5:45:07  InnoDB: highest supported file format is Barracuda.
110128  5:45:07  InnoDB: 1.1.4 started; log sequence number 1595675
110128  5:45:07 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
110128  5:45:07 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
110128  5:45:07 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
110128  5:45:07 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.8'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
*******************

Then I ran the the following and it worked. Should I be concerned about errors above although it seems to be working now.

didim: /> service mysqld startsos
Starting mysqld:                                           [  OK  ]
didim: />

Re: Can't get MYSQL to start

The startsos option allow you to simply launch mysql with "--skip-grant-tables --skip-networking" for maintainance (using the right configuration option, which are not ok using mysqld --skip-grant )

Error have been fixed, but as you have encoutered error during the first database creation, I will recommand to recreate it

service mysqld stop
rm -rf /var/lib/mysql/*
service mysqld start
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Thank you so much for quick responses. Here is what I got this time:

didim: /> service mysqld stop
Stopping mysqld:                                           [  OK  ]
didim: /> rm -rf /var/lib/mysql/*
didim: /> service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h didim.erglobal.com password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
didim: /> service mysqld start

Re: Can't get MYSQL to start

strange... and in /var/lib/mysqld.log ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Here is what I see...

110128  5:56:52  InnoDB: Starting shutdown...
110128  5:56:53  InnoDB: Shutdown completed; log sequence number 1595675
110128  5:56:53 [Note] /usr/libexec/mysqld: Shutdown complete

110128 05:56:53 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
110128 05:59:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
110128  5:59:22 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110128  5:59:22  InnoDB: Using Linux native AIO
110128  5:59:22  InnoDB: Initializing buffer pool, size = 128.0M
110128  5:59:22  InnoDB: Completed initialization of buffer pool
110128  5:59:22  InnoDB: highest supported file format is Barracuda.
110128  5:59:22  InnoDB: 1.1.4 started; log sequence number 1595675
110128  5:59:22 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
110128  5:59:22 [ERROR] Do you already have another mysqld server running on port: 3306 ?
110128  5:59:22 [ERROR] Aborting

110128  5:59:22  InnoDB: Starting shutdown...
110128  5:59:23  InnoDB: Shutdown completed; log sequence number 1595675
110128  5:59:23 [Note] /usr/libexec/mysqld: Shutdown complete

110128 05:59:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
didim: />

Re: Can't get MYSQL to start

So seems it is already running...

Don't understand how can you get to this situation...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

How would I find out if there is another one running? Or confirm not running. I tried a lot of different things so far no luck.

Re: Can't get MYSQL to start

Try

 netstat -natup | grep 3306

Get the found process number

cat /proc/<thisnumber>/cmdline
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Thi is interesting:

didim: /> netstat -natup | grep 3306
tcp        0      0 :::3306                     :::*                        LISTEN      4127/m          ysqld
didim: /> netstat -natup | grep 3306
tcp        0      0 :::3306                     :::*                        LISTEN      4127/mysqld     
didim: /> cat /proc/4127/cmdline
/usr/libexec/mysqld--skip-grantdidim: />
leted; log sequence number 1595675

Re: Can't get MYSQL to start

Remi:
why would stopping the mysqld service not stop the
/usr/libexec/mysqld --skip-grant process? Any idea. How can I make sure this stops?

Sorry for my limited Linux knowledge here.

Re: Can't get MYSQL to start

Kill this process.

You don't have to launch directly "mysqld", you must always use the "service" command.

+

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Can't get MYSQL to start

Thank you so much. You are the best.

It is working now.