Error while running mysqldump

https://www.mysqltutorial.org/mysql-copy-database Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) when trying to connect

am getting this error using mysqldump -https://www.mysqltutorial.org/mysql-copy-database

Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) when trying to connect

Hi @Pam,

Please refrain from posting errors as part of the titles!

Could you provide some more information about your instance? Form what I can see this most likly won’t be a Suite issue, are you sure the command format and the credentials you are using are correct?

yes am trying to transfer data from one server to another server of same versions using mysqldump is there any way to transfer data

Which command are you trying to execute exactly (pls replace actual IPs/Urls/passwords with placeholders)?
Further, you seem to work with the terminal - is the mysql server running on the same machine or somewhere else?

Many ways but none i would fully recommend as they all have there own problems.

Personal suggestion,

  • Take a full copy of the codebase (SuiteCRM instance code) on the first instance and transfer this to the second server.

  • Secondly to move the actual data use;
    mysqldump -h=mariadb -u=USERNAME -p DB_NAME > DB_NAME.sql
    Replacing the required details and filling in the password when prompted.

aam getting this error - Job for mysql.service failed because the control process exited with error code.See “systemctl status mysql.service” and “journalctl -xe” for details

running on the same machine while dumping the data am getting this error - mysqldump: Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) when trying to connect

Is SuiteCRM set up fully? Have you checked you’re using the right password and username? What happens when you run?: mysql -u=USERNAME -p

ERROR 1045 (28000): Access denied for user ‘=USERNAME’@‘localhost’ (using password: YES)
getting this now

Have you changed the username to the user which you’re trying to connect with? by default root