• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Major screw up BY ME

K

krappleby

Guest
Hey all. i hope you are sat down. you will laugh at the stupidity of this..

Ok..

a few month ago, i set up an account in my plesk control panel, and set the db access to the admin settings for mysql.. This meant i had a database in the account which would allow me to access the root database settings of mysql, thus enabling me to make some changes when and where necisary..

When i opened the database, i got the root access privilages..

I hope that is clear

Now for the STUPID BIT

:mad:i forgot about it and I DELETED THE DATABASE from within plesk :mad:

Now when i try to load plesk i get

Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
--------------------------------------------------------------------------------
0: /usr/local/psa/admin/auto_prepend/auth.php3:1 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")

I had someone fix that problem for about 14 minutes, then it came back.. During that time i tried to remove a different domain and got this error

unable to remove domains: problems occured while removing domains: unable to update dns zone for domain dnsmng failed: dnsmng: db_connect: failed to connect to database: error: access denied for user: 'admin AT localhost'(using password: YES)
dnsmng : unable to connect to the mysql database

Can anyone tell me how to solve this problem..
You can see my problem by visiting

https://kra-webdesign.com:8443

HELP
 
Easiest question would be:
does the file /var/lib/mysql/mysql.sock exist?
This is the socket file that is created when MySQL is on... by the sounds of the error, something in your MySQL is preventing it from booting, or the sock file is not stored where Plesk is looking for it (this is the directory that is given in your my.cnf file).
When you SSH into your server, and send the command:
/sbin/service mysqld restart
What happens? Does MySQL restart gracefully, or does it fail? If it fails, what error does it give at the time?
 
ok i found the mysql daily dumps files,

How do i restore them.. I know nothing about linux.. HELP
 
Did a quick search (having never had to restore from a MySQL Dump yet), and found this... hope it helps, but I would suggest you dig further to confirm that the syntax is correct... but hopefully it will give you something to start from.

Originally posted by SmartPCSystems at http://forum.sw-soft.com/showthread.php?s=&threadid=12507
Try to start MySQL first (shell commands begin with '#' symbol):

# service mysqld start

After that dump current database just in case:

# mysqldump -Q -uadmin -p`cat /etc/psa/.psa.shadow` psa > psa.sql

Now drop the psa database and restore it from daily dump (unfortunatelly today's changes will be lost):

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "drop database psa;"
# zcat /var/lib/psa/dumps/mysql.daily.dump.0.gz | mysql -uadmin -p`cat /etc/psa/.psa.shadow`
 
Originally posted by NightStorm
Easiest question would be:
does the file /var/lib/mysql/mysql.sock exist?
This is the socket file that is created when MySQL is on... by the sounds of the error, something in your MySQL is preventing it from booting, or the sock file is not stored where Plesk is looking for it (this is the directory that is given in your my.cnf file).
When you SSH into your server, and send the command:
/sbin/service mysqld restart
What happens? Does MySQL restart gracefully, or does it fail? If it fails, what error does it give at the time?

Ok i did that and get hte following errors

Stopping MySQL: [FAILED]
Starting MySQL; [ ok ]

any suggestions
 
Originally posted by NightStorm
Did a quick search (having never had to restore from a MySQL Dump yet), and found this... hope it helps, but I would suggest you dig further to confirm that the syntax is correct... but hopefully it will give you something to start from.

Originally posted by SmartPCSystems at http://forum.sw-soft.com/showthread.php?s=&threadid=12507

tried to do mysql dump.. got
mysldump : got error : 2002 : cant connect to local mysql server through socket /var/lib/mysql/mysql.sock (2) when trying to connect
 
see above post.. according to my system it is running . but it will not shut down, and also cant dump

any ideas
 
Hello,
Based on the error, my guess is that mysql is not running.
Maybe perms are wrong on the pipe..

do this..
ps -auxww |grep mysql
--AND--
ls -la /var/lib/mysql

Cheers.
 
with the first command got

root 21453 0.0 0.1 2108 1032 ? S 20:30 0:00 /bin/sh /usr/bin/
safe_mysqld --skip-grant-tables -u mysql
mysql 21941 0.0 0.1 13888 1940 ? S 20:37 0:00 /usr/libexec/mysq
ld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysq
ld/mysqld.pid --skip-locking --skip-grant-tables -u mysql
root 1681 0.0 0.0 1504 448 pts/0 S 23:53 0:00 grep mysql

with the second command got a list of folders in the mysql folder

cheers
 
Your mysql could be running fine - but where is the location of the mysql.sock file it creates?

You might need to symlink it to /var/lib/mysql/mysql.sock if MySQL creates it in another dir.
 
Back
Top