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. 2017-11-08, 03:04:14

Author Topic: sql not start after table repair  (Read 1967 times)

0 Members and 1 Guest are viewing this topic.

Offline cmdman

  • Senior Member
  • *
  • Posts: 297
  • Karma: +0/-0
    • View Profile
sql not start after table repair
« on: 2015-04-07, 10:30:33 »
hi mr

i tried to repair one sql table after its shows corrupted i repaired ti via phpmyadmin now problem is iam not able to start sql it show error

[root@server script]# sh restart-all
Stopping mysqld:                                           [  OK  ]
Timeout error occurred trying to start MySQL Daemon.
Starting mysqld:                                           [FAILED]



[root@server script]# mysql -u mydb -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: sql not start after table repair
« Reply #1 on: 2015-04-07, 10:34:06 »
Reset mysql password with 'sh /script/reset-mysql-root-password YOURPASSWORD' and then 'sh /script/mysql-convert --engine=myisam'.

Next time, better repair/optimize via 'sh /script/mysql-optimize --select=repair/optimize'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 297
  • Karma: +0/-0
    • View Profile
Re: sql not start after table repair
« Reply #2 on: 2015-04-07, 10:43:28 »
iam getting this error


[root@server script]# sh /script/reset-mysql-root-password mypassword
Stop MySQL service...
MySQL ROOT password reset...
Start MySQL service...
Connect failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@server script]#

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: sql not start after table repair
« Reply #3 on: 2015-04-07, 10:52:57 »
Inform here 'yum list installed mysql* MariaDB*; cat /etc/my.cnf; dir -l /var/lib/mysql*'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 297
  • Karma: +0/-0
    • View Profile
Re: sql not start after table repair
« Reply #4 on: 2015-04-07, 10:57:27 »
ok  its here

Quote
[root@server ~]# yum list installed mysql* MariaDB*
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
Loading mirror speeds from cached hostfile
 * Webmin: webmin.mirror.somersettechsolutions.co.uk
 * base: centos.quelquesmots.fr
 * extras: centos.quelquesmots.fr
 * mratwork-epel: mirrors.ircam.fr
 * mratwork-ius-stable: mirrors.ircam.fr
 * updates: centos.quelquesmots.fr
0 packages excluded due to repository protections
Installed Packages
mysql55.x86_64                             5.5.42-1.ius.el6                      @mratwork-ius-stable
mysql55-libs.x86_64                        5.5.42-1.ius.el6                      @mratwork-ius-stable
mysql55-server.x86_64                      5.5.42-1.ius.el6                      @mratwork-ius-stable
mysqlclient16.x86_64                       5.1.61-4.ius.el6                      @mratwork-ius-stable
[root@server ~]# clear
[root@server ~]# yum list installed mysql* MariaDB*
Loaded plugins: fastestmirror, priorities, protectbase, replace, security
Loading mirror speeds from cached hostfile
 * Webmin: webmin.mirror.somersettechsolutions.co.uk
 * base: centos.quelquesmots.fr
 * extras: centos.quelquesmots.fr
 * mratwork-epel: mirrors.ircam.fr
 * mratwork-ius-stable: mirrors.ircam.fr
 * updates: centos.quelquesmots.fr
0 packages excluded due to repository protections
Installed Packages
mysql55.x86_64                             5.5.42-1.ius.el6                      @mratwork-ius-stable
mysql55-libs.x86_64                        5.5.42-1.ius.el6                      @mratwork-ius-stable
mysql55-server.x86_64                      5.5.42-1.ius.el6                      @mratwork-ius-stable
mysqlclient16.x86_64                       5.1.61-4.ius.el6                      @mratwork-ius-stable
[root@server ~]# cat /etc/my.cnf; dir -l /var/lib/mysql*
##  _______________________________________________________________________
## / 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]
;###123###skip-innodb
default-storage-engine=myisam
ft_min_word_len = 3
max_allowed_packet=100M
local-infile=0
;###123###skip-networking
#OpenVZ AIO bug fix
innodb_use_native_aio=0

## General
datadir                         = /var/lib/mysql
tmpdir                          = /var/lib/mysqltmp
socket                          = /var/lib/mysql/mysql.sock
;###123###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              = 100M
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

/var/lib/mysql:
total 28736
drwx------ 2 mysql mysql    12288 Apr  6 20:25 afterlogic
-rw-rw---- 1 mysql mysql 18874368 Apr  7 09:22 ibdata1
-rw-rw---- 1 mysql mysql  5242880 Apr  7 10:58 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 Apr  6 20:09 ib_logfile1
drwx------ 2 mysql mysql    12288 Apr  6 20:25 kloxo
drwx------ 2 mysql mysql    20480 Apr  7 08:56 magico
drwx------ 2 mysql mysql     4096 Apr  6 20:25 mysql
drwx------ 2 mysql mysql     4096 Apr  6 20:09 performance_schema
drwx------ 2 mysql mysql     4096 Apr  6 20:25 roundcubemail
drwx------ 2 mysql mysql     4096 Apr  6 20:09 test
drwx------ 2 mysql mysql     4096 Apr  6 22:06 vpopmail

/var/lib/mysqllogs:
total 0

/var/lib/mysqltmp:
total 0
[root@server ~]#

[/quote/


Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: sql not start after table repair
« Reply #5 on: 2015-04-07, 10:58:02 »
Also 'dir -l /var/lib/mysql/*.err'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: sql not start after table repair
« Reply #6 on: 2015-04-07, 10:59:51 »
Try remove all ';###123##' inside /etc/my.cnf
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 297
  • Karma: +0/-0
    • View Profile
Re: sql not start after table repair
« Reply #7 on: 2015-04-07, 11:13:58 »
ok here it is


[root@server script]# dir -l /var/lib/mysql/*.err
dir: cannot access /var/lib/mysql/*.err: No such file or directory
[root@server script]# clear


[root@server script]# cat /etc/my.cnf; dir -l /var/lib/mysql
##  _______________________________________________________________________
## / 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
ft_min_word_len = 3
max_allowed_packet=100M
local-infile=0
skip-networking
#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              = 100M
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

total 28736
drwx------ 2 mysql mysql    12288 Apr  6 20:25 afterlogic
-rw-rw---- 1 mysql mysql 18874368 Apr  7 09:22 ibdata1
-rw-rw---- 1 mysql mysql  5242880 Apr  7 11:14 ib_logfile0
-rw-rw---- 1 mysql mysql  5242880 Apr  6 20:09 ib_logfile1
drwx------ 2 mysql mysql    12288 Apr  6 20:25 kloxo
drwx------ 2 mysql mysql    20480 Apr  7 08:56 magico
drwx------ 2 mysql mysql     4096 Apr  6 20:25 mysql
drwx------ 2 mysql mysql     4096 Apr  6 20:09 performance_schema
drwx------ 2 mysql mysql     4096 Apr  6 20:25 roundcubemail
drwx------ 2 mysql mysql     4096 Apr  6 20:09 test
drwx------ 2 mysql mysql     4096 Apr  6 22:06 vpopmail
[root@server script]#

Online MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,381
  • Karma: +112/-9
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: sql not start after table repair
« Reply #8 on: 2015-04-07, 11:35:04 »
Investigate /var/log/mysqld.log to find out about error.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline cmdman

  • Senior Member
  • *
  • Posts: 297
  • Karma: +0/-0
    • View Profile
Re: sql not start after table repair
« Reply #9 on: 2015-04-07, 11:45:21 »
ok i will check please let me know how can i take sql backup now as i cont access mrpanel and even i am not able to take backup from command line ,i just need sql backup

so that i can reload os and install panel again

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.043 seconds with 17 queries.

web stats analysis
 
Mirror created by MasterkinG32.CoM