I'm trying to do database management via SSH for Bitnami's WordPress Multi-tier Stack/ Specifically I want to export and do an initial import (though I will probably just create a new database).
When I run the following commands, I get the following errors:
mysqldump -u root -p bitnami_wordpress > bitnami_wordpress.sql
mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/opt/bitnami/mariadb/tmp/mysql.sock' (2)" when trying to connect
This also creates an 0B SQL file in my home directory.
mysqladmin -u root -p status (I enter my password)
mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket . '/opt/bitnami/mariadb/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/opt/bitnami/mariadb/tmp/mysql.sock' exists!
cd /opt/bitnami/mariadb/ +
bin CREDITS include licenses README-wsrep COPYING data INSTALL-BINARY plugin sbin COPYING.thirdparty EXCEPTIONS-CLIENT lib README.md share
sudo find . -name mysql
./root/.nami/components/com.bitnami.mysql-client/lib/databases/mysql ./root/.nami/components/com.bitnami.mysql-client/lib/handlers/databases/mysql ./root/.nami/components/com.bitnami.libphp/lib/databases/mysql ./root/.nami/components/com.bitnami.libphp/lib/handlers/databases/mysql ./root/.nami/components/com.bitnami.wordpress/lib/databases/mysql ./root/.nami/components/com.bitnami.wordpress/lib/handlers/databases/mysql ./root/.nami/components/com.bitnami.php/lib/databases/mysql ./root/.nami/components/com.bitnami.php/lib/handlers/databases/mysql ./root/.nami/components/com.bitnami.apache/lib/databases/mysql ./root/.nami/components/com.bitnami.apache/lib/handlers/databases/mysql ./root/.nami/components/com.bitnami.mariadb/lib/databases/mysql ./root/.nami/components/com.bitnami.mariadb/lib/handlers/databases/mysql ./opt/bitnami/mysql ./opt/bitnami/mysql/bin/mysql ./opt/bitnami/mariadb/include/mysql ./opt/bitnami/mariadb/include/mysql/server/mysql ./opt/bitnami/mariadb/include/mysql/mysql ./opt/bitnami/mariadb/bin/mysql ./usr/share/bash-completion/completions/mysql
find /opt/bitnami/mysql/ -name "*.cnf"
find /opt/bitnami/mariadb/ -name "my.cnf"
/opt/bitnami/mariadb/share/my-medium.cnf /opt/bitnami/mariadb/share/my-small.cnf /opt/bitnami/mariadb/share/my-large.cnf /opt/bitnami/mariadb/share/my-innodb-heavy-4G.cnf /opt/bitnami/mariadb/share/my-huge.cnf /opt/bitnami/mariadb/share/wsrep.cnf
nano /opt/bitnami/mariadb/share/my-medium.cnf (what's the difference between my-medium, my-small, and my-large)?
# The following options will be passed to all MariaDB clients [client] #password = your_password port = 3306 socket = /opt/bitnami/mariadb/tmp/mysql.sock
/opt/bitnami/mariadb/tmp/mysql.sock does not exist.
mysql.server start (Though if my WP site is working wouldn't this already be running?)
-bash: mysql.server: command not found
I've poked around a bit and came across MariaDB's Documentation about 2002 errors, but I don't seem to have the same .conf file (nor do I know where to look)
...from here I have no idea where to go, I've only done limited database management via shell.
- How do I export my database without getting the 2002 error?
- How do I overwrite / update my database?
Any help would be much appreciated and thanks in advance!