This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

suddenly cannot connect database
#1
suddenly cannot connect database
when i try go surf sentora login page , it say cannot connect database.
maybe I did not shutdown linux normally yesterday

I try to reboot my vps but still not working.
when i type mysql in ssh, it said
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

How can I fix it?
Thanks

Critical Error: [0100] - Unable to connect or authenticate to the Sentora database (sentora_core).

We advice that you contact the server administrator to ensure that the database server is online and that the correct connection parameters are being used.

http://forums.sentora.org/showthread.php...mysql.sock
I try found this post but still can't fix it.
df -h 

Filesystem               Size  Used Avail Use% Mounted on

/dev/mapper/centos-root   48G   40G  7.6G  85% /

devtmpfs                 486M     0  486M   0% /dev

tmpfs                    497M     0  497M   0% /dev/shm

tmpfs                    497M  6.6M  490M   2% /run

tmpfs                    497M     0  497M   0% /sys/fs/cgroup

/dev/vda1                497M  354M  144M  72% /boot
tmpfs                    100M     0  100M   0% /run/user/0

sudo service mysqld restart
Failed to restart mysqld.service: Unit not found.

mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
service mysqld start
not working

systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

● mariadb.service - MariaDB database server

   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)

   Active: failed (Result: exit-code) since Thu 2017-04-06 10:13:18 JST; 4s ago

  Process: 4191 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)

  Process: 4190 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)

  Process: 4162 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)

 Main PID: 4190 (code=exited, status=0/SUCCESS)


systemctl status mariadb.service

Apr 06 10:13:15 mtserver.melon-tea.com systemd[1]: Starting MariaDB database server...

Apr 06 10:13:15 mtserver.melon-tea.com mysqld_safe[4190]: 170406 10:13:15 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.

Apr 06 10:13:15 mtserver.melon-tea.com mysqld_safe[4190]: 170406 10:13:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Apr 06 10:13:18 mtserver.melon-tea.com systemd[1]: mariadb.service: control process exited, code=exited status=1

Apr 06 10:13:18 mtserver.melon-tea.com systemd[1]: Failed to start MariaDB database server.

Apr 06 10:13:18 mtserver.melon-tea.com systemd[1]: Unit mariadb.service entered failed state.
Apr 06 10:13:18 mtserver.melon-tea.com systemd[1]: mariadb.service failed.


some log file of /var/log/mariadb/mariadb.log
170406 10:13:44 [ERROR] Aborting



170406 10:13:44  InnoDB: Starting shutdown...

170406 10:13:45  InnoDB: Shutdown completed; log sequence number 348406146

170406 10:13:45 [Note] /usr/libexec/mysqld: Shutdown complete



170406 10:13:45 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

170406 10:26:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

170406 10:26:09 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 1514 ...

170406 10:26:09 [Warning] Can't create test file /var/lib/mysql/mtserver.lower-test

170406 10:26:09 InnoDB: The InnoDB memory heap is disabled

170406 10:26:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins

170406 10:26:09 InnoDB: Compressed tables use zlib 1.2.7

170406 10:26:09 InnoDB: Using Linux native AIO

170406 10:26:09 InnoDB: Initializing buffer pool, size = 128.0M

170406 10:26:09 InnoDB: Completed initialization of buffer pool

170406 10:26:09 InnoDB: highest supported file format is Barracuda.

170406 10:26:09  InnoDB: Waiting for the background threads to start

170406 10:26:10 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 348406146

170406 10:26:10 [Note] Plugin 'FEEDBACK' is disabled.

170406 10:26:10 [Note] Server socket created on IP: '::1'.

170406 10:26:10 [ERROR] Can't start server : Bind on unix socket: Permission denied

170406 10:26:10 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
170406 10:26:10 [ERROR] Aborting
Reply
Thanks given by:
#2
RE: suddenly cannot connect database
Ha "Percona XtraDB " this is not the official setup.

How you did get it there? Did you try to force upgrade the default db?

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
MySQL Database user prefix MosleyCale 1 4 ,930 10-17-2020, 09:11 PM
Last Post: Ron-e
Critical Error: [0100] - Unable to connect or authenticate to the Sentora database whatshisface77 1 3 ,856 07-31-2020, 10:58 AM
Last Post: whatshisface77
repo browser Critical Error: [0144] - Sentora database 'query' error (42000). zustudios 0 4 ,149 12-21-2019, 08:08 AM
Last Post: zustudios

Forum Jump:


Users browsing this thread: 1 Guest(s)