Announcement

Collapse
No announcement yet.

Backup (SSH)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Backup (SSH)

    I try to make a backup by means of SSH but I get after logging and enter the command a error.
    My command is: mysqldump --opt -Q -u mydbusername -p mydbname > /domains/mydomein.nl/public_html/backup/test.sql
    I get, however, a test.sql file in the backup map, but the file is empty.

    The error is:

    Code:
    Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect -/bin/bash-2.05b$
    What is wrong ? I use PuTTY

  • #2
    You are probably not using localhost for your database server. Try adding a '-h hostname' (without the quotes) to the command above, pust it after your username. You can use the same hostname as you are using in your includes/config.php
    Want to take your board beyond the standard vBulletin features?
    Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

    Comment


    • #3
      Originally posted by MarcoH64
      You are probably not using localhost for your database server. Try adding a '-h hostname' (without the quotes) to the command above, pust it after your username. You can use the same hostname as you are using in your includes/config.php
      Thanks for your answer, but with the command under, it does not succeed also, same error.

      mysqldump --opt -Q -u mydbusername -h localhost -p mydbname > /domains/mydomein.nl/public_html/backup/test.sql

      Comment


      • #4
        Try this:

        Code:
        mysqldump -qce -r SomeName.sql -u UserID DbName
        -----------------------------------------------------------
        Running custom version of vBulletin based on v4.2.5
        PHP 7.4.14 :: MariaDB 10.5.8

        Comment


        • #5
          Originally posted by 1QuickSI
          Try this:

          Code:
          mysqldump -qce -r SomeName.sql -u UserID DbName
          Not working , thanks anyway

          Comment


          • #6
            And you are also using localhost as database servername in your config.php?

            The only other logical reason i can think of would be if the permissions would deny access for your current shell user.
            Want to take your board beyond the standard vBulletin features?
            Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

            Comment


            • #7
              Originally posted by MarcoH64
              And you are also using localhost as database servername in your config.php?

              The only other logical reason i can think of would be if the permissions would deny access for your current shell user.
              Yes I have localhost by my master database server name, I'm looking at my control panel en SSH is on, i can connect to it and accept my password en username.

              Comment

              Loading...
              Working...
              X