Bagaimana cara mengatasi Error koneksi mysql


Status
Not open for further replies.

Andie Odestory

Beginner 2.0
Saya menggunakan kloxo do dedicated server. tiba2 koneksi database jadi error.

Capture.PNG

dan ini isi my.cnf di ./etc/my.cnf

Code:
[mysqld]
default-storage-engine=innodb
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

mohon bantuan dari para master :)
 

Andie Odestory

Beginner 2.0
saya tidak menemukan mysql.sock di /var/lib/mysql

Pada /etc/my.cnf mengganti default-storage-engine=innodb menjadi default-storage-engine=MyISAM
juga menambahkan innodb=OFF

ini log /var/log/mysqld.log

Code:
120709 21:00:51 *mysqld started
InnoDB: Log scan progressed past the checkpoint lsn 0 2279106811
120709 21:00:51 *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 0 2279110101
120709 21:00:51 *InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 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 120709 21:00:51InnoDB: Assertion failure in thread 3054042000 in file rem0rec.c line 339
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
120709 21:00:51 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.




key_buffer_size=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to*
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.




thd=(nil)
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xb608e3f8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x818e628
0x8432cd7
0x842f7b0
0x83f41c6
0x83f6148
0x83e1729
0x840e95b
0x8350748
0x540889
0x4aa17e
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do*
resolve it
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
120709 21:00:51 *mysqld ended
 

mustafaramadhan

Hosting Guru
Coba baca LxCenter Forum: Technical Help » How to setup domain from dot.tk? untuk memilih my.conf yang 'pas' (sesuai memory yang tersedia).

Jika tidak harus, tidak usah pakai innodb sehingga cukup myisam.

Soal mysql.sock yang hilang, coba jalankan 'service mysqld stop ; mksock /var/lib/mysql/mysql.sock; service mysqld start'
 

mustafaramadhan

Hosting Guru
Oh ya, ada yang terlupa.

Jika ingin convert database ke engine lain di kloxo, coba jalankan 'sh /script/mysql-convert' maka akan ditampilkan kemungkinannya. Secara sederhana bisa jalankan 'sh /script/mysql-convert --engine=myisam' jika ingin pakai myisam
 

Andie Odestory

Beginner 2.0
'service mysqld stop ; mksock /var/lib/mysql/mysql.sock; service mysqld start' Tidak bisa membuat mysql.sock ti
dak ada error pemberitahuan pun.

saya ganti ke myisam tapi masih sama
Oh ya, ada yang terlupa.

Jika ingin convert database ke engine lain di kloxo, coba jalankan 'sh /script/mysql-convert' maka akan ditampilkan kemungkinannya. Secara sederhana bisa jalankan 'sh /script/mysql-convert --engine=myisam' jika ingin pakai myisam


saya ganti my.conf dengan yang bapak sarankan di LxCenter Forum: Technical Help » Server Load too High

Code:
[root@server ~]# service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]
[root@server ~]#

Saya ganti lagi ke my.conf default tetep sama.

Proses tail -10 /var/log/mysqld.log

Code:
[root@server ~]# tail -10 /var/log/mysqld.log
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120710 18:39:09  mysqld ended

120710 18:50:05  mysqld started
120710 18:50:05 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05  mysqld ended

[root@server ~]#

Proses tail -30 /var/log/mysqld.log

Code:
[root@server ~]# tail -30 /var/log/mysqld.log
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120710 18:30:23  mysqld ended

120710 18:38:35  mysqld started
120710 18:38:35  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120710 18:38:35  mysqld ended

120710 18:39:09  mysqld started
120710 18:39:09  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
120710 18:39:09  mysqld ended

120710 18:50:05  mysqld started
120710 18:50:05 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05 [ERROR] /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
120710 18:50:05  mysqld ended

[root@server ~]#
 
Status
Not open for further replies.

Top