MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: alex_fear on 2016-02-10, 15:38:36
-
Stopped working MySQL database
what to do ?
[root@VM1 ~]# mysql restart
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Con nection refused")
[root@VM1 ~]# sh /script/sysinfo
A. Control Panel:
- Kloxo-MR: 7.0.0.b-2016021005
- Web: hiawatha-10.0.0-f.6.mr.el6.x86_64
- PHP: php54s-5.4.44-1.ius.el6 (cgi mode)
B. Plateform:
- OS: CentOS release 6.7 (Final) x86_64
- Hostname: VM1
C. Services:
1. MySQL: MariaDB-server-10.0.20-1.el6.x86_64
2. PHP:
- Branch: php54-cli-5.4.45-1.ius.el6.x86_64
- Multiple:
* php52m-5.2.17-102.mr.el6
* php53m-5.3.29-1.ius.el6
* php54m-5.4.44-1.ius.el6
* php55m-5.5.28-1.ius.el6
* php56m-5.6.12-1.ius.el6
- Used: php56m
3. Httpd: httpd-2.2.31-1.mr.el6.x86_64
- PHP Type: [unknown]
4. Lighttpd: --uninstalled--
5. Hiawatha: --unused--
6. Nginx: --uninstalled--
7. Cache: --uninstalled--
8. Dns: bind-9.9.7-1.mr.el6.x86_64
9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
- with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
D. Memory:
total used free shared buffers cached
Mem: 2815 889 1925 13 66 481
-/+ buffers/cache: 341 2473
Swap: 1999 0 1999
E. Disk Space:
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 97G 21G 72G 23% /
*** Process Time: 00:00:00:11.11057 (dd:hh:mm:ss:xxxxxx) ***
* Note: run 'sh /script/sysinfo -y' if you want run 'fix-service-list' also
(importance after Kloxo-MR update)
-
1. Try modified /etc/my.cnf.d/server.cnf to change 'skip-innodb' to '#skip-innodb' and then restart with 'sh /script/restart-mysql -y'
2. If still error, try 'sh /script/mysql-optimize --select=repair'
-
vi /etc/my.cnf.d/server.cnf ?? ?????????
[root@VM1 file]# vi /etc/my.cnf.d/server.cnf
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
default-storage-engine=innodb
#skip-innodb
performance_schema=on
#OpenVZ AIO bug fix
innodb_use_native_aio=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.0 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.0]
when performing restoration
[root@VM1 file]# sh /script/mysql-optimize --select=repair
Mysql Check/Repair/Optimize/Upgrade
- Repairing database
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused") when trying to connect
- MySQL Service restart
If you try to login kloxo gives an error message Alert: Login Unsuccessful
Issued when go to the website issue Error 500 - Internal Server Error
A generic error message, given when no more specific message is suitable
-
Try 'sh /script/mysql-optimize --select=upgrade'
-
server response
[root@VM1 ~]# sh /script/mysql-optimize --select=upgrade
Mysql Check/Repair/Optimize/Upgrade
- Upgrading database
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")
FATAL ERROR: Upgrade failed
- MySQL Service restart
-
Inform here 'cat /var/lib/mysql/*.err' (enough latest 20 lines).
-
150708 11:16:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150708 11:16:36 [Note] /usr/sbin/mysqld (mysqld 10.0.20-MariaDB) starting as process 25357 ...
150708 11:16:36 [Note] Plugin 'InnoDB' is disabled.
150708 11:16:36 [Note] Plugin 'FEEDBACK' is disabled.
150708 11:16:36 [Note] Server socket created on IP: '::'.
150708 11:16:36 [Note] Event Scheduler: Loaded 0 events
150708 11:16:36 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1286: Unknown storage en gine 'InnoDB'
150708 11:16:36 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.20-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
150708 11:18:24 mysqld_safe A mysqld process already exists
150708 11:23:28 mysqld_safe A mysqld process already exists
150708 11:23:39 [Warning] Host name 'reserve.cableplus.com.cn' could not be resolved: Name or service not known
150708 11:23:44 [Note] /usr/sbin/mysqld: Normal shutdown
150708 11:23:44 [Note] Event Scheduler: Purging the queue. 0 events
150708 11:23:44 [Note] /usr/sbin/mysqld: Shutdown complete
150708 11:23:44 mysqld_safe mysqld from pid file /var/lib/mysql/VM1.pid ended
150708 11:23:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150708 11:23:47 [Note] /usr/sbin/mysqld (mysqld 10.0.20-MariaDB) starting as process 2169 ...
-
Try reboot.
-
Rebooting does not helps. :'( :'( :'(
[root@VM1 ~]# service mysql status
ERROR! MySQL is not running, but PID file exists
[root@VM1 ~]# service mysql start
Starting MySQL.. SUCCESS!
[root@VM1 ~]# service mysql status
ERROR! Multiple MySQL running but PID file could not be found (5285 5280)
[root@VM1 ~]# service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL. SUCCESS!
When you try to run mysql provides just such a mistake .
-
What's you do or happen because this issue appear?.
-
Nothing. After rebooting, stopped working database mysql database .
-
Hmmm. Give me access to ssh and Kloxo-MR panel. I want to know what's happen.
Send your access via PM.
-
ok.
-
The problem is you try update MariaDB from 10.0.x to 10.1.x but possible make your database crash. Sadly, look like your mysql using innodb as storage-engine and need recover. So, I try downgrade to 10.0.x.
-
I am just backup your /var/lib/mysql to /var/lib/mysql.bck.
-
Also add 'innodb_force_recovery=4' in /etc/my.cnf.d/server.cnf. And then need backup, delete database, disable recovery (need restart) and then restore process.
-
I can not remove the base from the kloxo. The base is removed physically and Kloxo panel remains.
When you create a database database physically soda and Kloxo panel is not displayed .
-
Fix services
- Fix dns services
- Fix webcache services
- Fix ssl services
- Fix php services
- Fix web services
- Fix mail-all services
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")
Enter password:
When i cleanup