Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 15:40:57

Author Topic: MySQL error?  (Read 3486 times)

0 Members and 1 Guest are viewing this topic.

Offline hoangsang

  • Valuable Member
  • *
  • Posts: 97
  • Karma: +0/-0
    • View Profile
MySQL error?
« on: 2014-11-30, 09:48:47 »
I'm viewed log MySQL:
Code: [Select]
41130 22:09:20 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141130 22:13:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141130 22:13:28 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
141130 22:13:28 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
141130 22:13:28 InnoDB: The InnoDB memory heap is disabled
141130 22:13:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141130 22:13:28 InnoDB: Compressed tables use zlib 1.2.3
141130 22:13:28 InnoDB: Initializing buffer pool, size = 128.0M
141130 22:13:28 InnoDB: Completed initialization of buffer pool
141130 22:13:28 InnoDB: highest supported file format is Barracuda.
141130 22:13:30 InnoDB: 5.5.40 started; log sequence number 57584443446
141130 22:13:30 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141130 22:13:30 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
141130 22:13:30 [Note] Server socket created on IP: '0.0.0.0'.
141130 22:13:30 [Warning] 'user' entry 'root@localhost.localdomain' ignored in --skip-name-resolve mode.
141130 22:13:30 [Warning] 'user' entry '@localhost.localdomain' ignored in --skip-name-resolve mode.
141130 22:13:30 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
141130 22:13:30 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
141130 22:13:30 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
141130 22:13:30 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50095, now running 50540. Please use mysql_upgrade to fix this error.
141130 22:13:30 [ERROR] mysql.user has no `Event_priv` column at position 29
141130 22:13:30 [ERROR] Cannot open mysql.event
141130 22:13:30 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
141130 22:13:30 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.40'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Distributed by The IUS Community Project
141130 22:23:20 [ERROR] Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50095, now running 50540. Please use mysql_upgrade to fix this error.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL error?
« Reply #1 on: 2014-11-30, 17:12:30 »
Look like your mysql database using old format.

The first time, run 'sh /script/mysql-convert --engine=myisam' and then run 'mysql_upgrade'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hoangsang

  • Valuable Member
  • *
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: MySQL error?
« Reply #2 on: 2014-12-01, 08:00:29 »
Look like your mysql database using old format.

The first time, run 'sh /script/mysql-convert --engine=myisam' and then run 'mysql_upgrade'
Thanks!
But after run 'htop' is:

Error 'open-files-limit  = 65535' ?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL error?
« Reply #3 on: 2014-12-01, 08:25:14 »
Inform here:
Code: [Select]
ulimit -a
cat /etc/security/limits.conf
cat /etc/sysctl.conf
cat /etc/my.cnf
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline hoangsang

  • Valuable Member
  • *
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: MySQL error?
« Reply #4 on: 2014-12-01, 08:38:53 »
Inform here:
Code: [Select]
ulimit -a
cat /etc/security/limits.conf
cat /etc/sysctl.conf
cat /etc/my.cnf
Code: [Select]
ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 71680
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 20480
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 71680
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
and
Code: [Select]
cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file

### begin -- add by Kloxo-MR
*                soft   nofile           20480
*                hard   nofile           40960
### end -- add by Kloxo-MR

cat /etc/sysctl.conf
Code: [Select]
]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296

### begin -- add by Kloxo-MR
fs.file-max = 209708
vm.swappiness = 10
vm.vfs_cache_pressure = 50
vm.dirty_background_ratio = 15
vm.dirty_ratio = 5
### end -- add by Kloxo-MR

cat /etc/my.cnf
Code: [Select]
# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296

### begin -- add by Kloxo-MR
fs.file-max = 209708
vm.swappiness = 10
vm.vfs_cache_pressure = 50
vm.dirty_background_ratio = 15
vm.dirty_ratio = 5
### end -- add by Kloxo-MR

[root@bachngocsach ~]# cat /etc/my.cnf
##  _______________________________________________________________________
## / Rackspace MySQL 5.5 Terse Configuration File                          \
## |                                                                       |
## | This is a base configuration file containing the most frequently used |
## | settings with reasonably defined default values for configuring and   |
## | tuning MySQL. Note that these settings can likely be further tuned in |
## | order to get optimum performance from MySQL based upon the database   |
## | configuration and hardware platform.                                  |
## |                                                                       |
## | While the settings provided are likely sufficient for most            |
## | situations, an exhaustive list of settings (with descriptions) can be |
## | found at:                                                             |
## | http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html   |
## |                                                                       |
## | Take care to only add/remove/change a setting if you are comfortable  |
## | doing so! For Rackspace customers, if you have any questions or       |
## | concerns, please contact the MySQL Database Services Team. Be aware   |
## | that some work performed by this team can involve additional billable |
## \ fees.                                                                 /
##  -----------------------------------------------------------------------
##         \   ^__^
##          \  (oo)\_______
##             (__)\       )\/\
##                 ||----w |
##                 ||     ||

[mysqld]
skip-innodb
default-storage-engine=myisam
#OpenVZ AIO bug fix
innodb_use_native_aio=0

## General
datadir                         = /var/lib/mysql
tmpdir                          = /var/lib/mysqltmp
socket                          = /var/lib/mysql/mysql.sock
skip-name-resolve
sql-mode                        = NO_ENGINE_SUBSTITUTION
#event-scheduler                = 1

## Cache
thread-cache-size               = 16
table-open-cache                = 4096
table-definition-cache          = 2048
query-cache-size                = 32M
query-cache-limit               = 1M

## Per-thread Buffers
sort-buffer-size                = 1M
read-buffer-size                = 1M
read-rnd-buffer-size            = 1M
join-buffer-size                = 1M

## Temp Tables
tmp-table-size                  = 32M
max-heap-table-size             = 64M

## Networking
back-log                        = 100
#max-connections                = 200
max-connect-errors              = 10000
max-allowed-packet              = 16M
interactive-timeout             = 3600
wait-timeout                    = 600

### Storage Engines
innodb                          = FORCE

## MyISAM
key-buffer-size                 = 64M
myisam-sort-buffer-size         = 128M

## InnoDB
#innodb-buffer-pool-size        = 128M
#innodb-log-file-size           = 100M
#innodb-log-buffer-size         = 8M
#innodb-file-per-table          = 1
#innodb-open-files              = 300

## Replication
server-id                       = 1
#log-bin                        = /var/log/mysql/bin-log
#relay-log                      = /var/log/mysql/relay-log
relay-log-space-limit           = 16G
expire-logs-days                = 7
#read-only                      = 1
#sync-binlog                    = 1
#log-slave-updates              = 1
#binlog-format                  = STATEMENT
#auto-increment-offset          = 1
#auto-increment-increment       = 2

## Logging
#log-output                      = FILE
#slow-query-log                  = 1
#slow-query-log-file             = /var/log/mysql/slow-log
#log-slow-slave-statements
#long-query-time                 = 2

[mysqld_safe]
log-error                       = /var/log/mysqld.log
open-files-limit                = 65535

[mysql]
no-auto-rehash



Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL error?
« Reply #5 on: 2014-12-01, 08:49:46 »
Change/disable 'open-files-limit = 65535' to '#open-files-limit = 65535' in /etc/my.cnf
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.04 seconds with 18 queries.

web stats analysis