Couchbase restore error - couchbase

server system: Ubuntu 10.04.2
Couchbase: 1.8.1
python: 2.7.3
back files: cbbackup ./default-data/default /data/Couchbase_backups/default_20120705
restore: cbrestore -a default_20120705/default*
root#945f14b6-3015-4dac-b486-a8914a3f553d:~# cbrestore -a /data/Couchbase_backups/default_20120706/defaults*
Error on key 'sk_deviceHistory_F118C61C-8B30-4667-A7E2-2959836734BD': Memcached error #32: Auth failure
Error on key 'sk_deviceHistory_F118C61C-8B30-4667-A7E2-2959836734BD': Memcached error #32: Auth failure
Error on key 'sk_deviceHistory_F118C61C-8B30-4667-A7E2-2959836734BD': Memcached error #32: Auth failure
Error on key 'sk_deviceHistory_F118C61C-8B30-4667-A7E2-2959836734BD': Memcached error #32: Auth failure
^Z
[1]+ Stopped cbrestore -a /data/Couchbase_backups/default_20120706/defaults*
root#945f14b6-3015-4dac-b486-a8914a3f553d:~# ps -ef|grep python
root 711 512 1 15:46 pts/2 00:00:00 python /opt/couchbase/lib/python/cbrestore -a /data/Couchbase_backups/default_20120706/defaults /data/Couchbase_backups/default_20120706/defaults-0.mb /data/Couchbase_backups/default_20120706/defaults-1.mb /data/Couchbase_backups/default_20120706/defaults-2.mb /data/Couchbase_backups/default_20120706/defaults-3.mb
root 726 512 0 15:46 pts/2 00:00:00 grep --color=auto python
root#945f14b6-3015-4dac-b486-a8914a3f553d:~# kill -9 711
root#945f14b6-3015-4dac-b486-a8914a3f553d:~# ps -ef|grep python
root 729 512 0 15:47 pts/2 00:00:00 grep --color=auto python
[1]+ Killed cbrestore -a /data/Couchbase_backups/default_20120706/defaults*
root#945f14b6-3015-4dac-b486-a8914a3f553d:~# ps -ef|grep python
root 731 512 0 15:47 pts/2 00:00:00 grep --color=auto python
root#945f14b6-3015-4dac-b486-a8914a3f553d:~#

have you tried the -u BUCKET_NAME and -p BUCKET_PASSWORD parameters? That way the cbrestore tool can successfully authenticate to the right bucket?
For more flag and usage, also, there's also the -h / --help parameter.

sudo ./cbbackup HOST:PORT ~/Documents/ -u ‘username’ -p ‘password‘ -b BUCKET_NAME
This works for me.

Related

ERROR! The server quit without updating PID file - Mysql server not starting

When I try to start mysql
Password:
ERROR! MySQL server PID file could not be found!
Starting MySQL
.Logging to '/usr/local/mysql/data/F.f.com.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/F.f.com.pid).
There is no mysql process running
F:data app$ ps aux | grep mysql
app 1665 0.0 0.0 4269080 816 s002 S+ 11:00PM 0:00.00 grep mysql
When I try to access the file
FWS:~ app $ ls /usr/local/mysql/data/F.f.com.err
ls: /usr/local/mysql/data/F.f.com.err: No such file or directory
FWS:~ app$
sudo chmod -R 777 /usr/local/mysql/
After giving complete permission it worked. No idea on how the permissions were overwritten

How to connect with AWS mysql server using commandline?

I am new to AWS EC2 and I wanted to connect the Mysql to upload an sql file.
I used bitvize sftp to upload the files and with this ftp i have a commandline window to work around the server.
Here i am trying to connect the mysql using commands like -
Verify that mysql server is up and running first by a 'ps -ef | grep mysql'
ec2-user 22352 254217 0 10:58 pts/0 00:00:00 grep --color=auto mysql
root 223349 1 0 2016 ? 00:00:00 /bin/sh /usr/libexec/mysql55/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 223349 226349 0 2016 ? 00:33:26 /usr/libexec/mysql55/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
Then i tried the command /usr/bin/mysql -uroot -p
it prompts the password.But i don't know the password or am i doing the correct method?
The bottom line is i need to create a db and user and upload an sql file for that DB.
How could i do it?
If the root user doesn't have a password, then don't use the -p option.

How to kill mysql started with "mysql_safe" script?

Short version: I started mysql with mysql_safe and I can't kill it.
Long version: Installing an older version of mysql with macport displayed this suggestion:
$ sudo port install mysql55-server
---> Computing dependencies for mysql55-server
---> Fetching archive for mysql55-server
---> Attempting to fetch mysql55-server-5.5.49_0.darwin_14.noarch.tbz2 from https://packages.macports.org/mysql55-server
---> Attempting to fetch mysql55-server-5.5.49_0.darwin_14.noarch.tbz2.rmd160 from https://packages.macports.org/mysql55-server
---> Installing mysql55-server #5.5.49_0
---> Activating mysql55-server #5.5.49_0
If this is a new install you might want to run:
$ sudo -u _mysql /opt/local/lib/mysql55/bin/mysql_install_db
Running that gave these instructions:
$ sudo -u _mysql /opt/local/lib/mysql55/bin/mysql_install_db
Installing MySQL system tables...
161102 13:15:44 [Note] /opt/local/lib/mysql55/bin/mysqld (mysqld 5.5.49) starting as process 54176 ...
OK
Filling help tables...
161102 13:15:44 [Note] /opt/local/lib/mysql55/bin/mysqld (mysqld 5.5.49) starting as process 54180 ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/opt/local/lib/mysql55/bin/mysqladmin -u root password 'new-password'
/opt/local/lib/mysql55/bin/mysqladmin -u root -h myusername password 'new-password'
Alternatively you can run:
/opt/local/lib/mysql55/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /opt/local ; /opt/local/lib/mysql55/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /opt/local/mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
At this point I (unwisely, it seems) ran:
$ cd /opt/local ; /opt/local/lib/mysql55/bin/mysqld_safe &
Now I cannot figure out how to stop the mysql and/or daemondo process(es):
$ ps aux | grep mysql55
myusername 54937 0.1 0.0 2432772 660 s001 R+ 1:39PM 0:00.00 grep mysql55
_mysql 54888 0.0 0.1 2667884 6340 ?? S 1:36PM 0:00.12 /opt/local/lib/mysql55/bin/mysqld --user=_mysql
root 54885 0.0 0.0 2479468 700 ?? Ss 1:36PM 0:00.00 /opt/local/bin/daemondo --label=mysql55-server --start-cmd /opt/local/lib/mysql55/bin/mysqld --user=_mysql ; --pid=exec
I've tried many variations of kill, targeting both mysql (which seems pointless) and daemondo, including (but not limited to) the following:
sudo kill -9 54888 // killing the mysql process results in a new pid
sudo kill 54885 // the doemondo process
sudo kill -SIGHUP 54885
sudo killall mysqld_safe
sudo kill -9 54822 // a reincarnation of the doemondo process
sudo mysqladmin shutdown
For centos or mint
/usr/bin# initctl
for ubuntu
pkill mysqld

mysql command does not execute mysql

The path to my bin folder with mysql:
usr/local/mysql/bin
Here is my zshrc bash config:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/Users/leon/bin/subl"
export PATH="/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH"
When I type mysql I get the following
Commands run:
echo $PATH
/Users/leongaban/.nvm/versions/node/v5.8.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
which mysql
mysql not found
mysql --help
zsh: command not found: mysql
sudo find / -name mysql
Password:
/Applications/MySQLWorkbench.app/Contents/MacOS/mysql
ps -ef | grep mysql
74 96 1 0 11:18AM ?? 0:02.90 /usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --port=3307
501 16302 9174 0 1:27PM ttys001 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn mysql
Here are a few commands that might help determine more about the problem:
echo $PATH
which mysql
mysql --help
find / -name mysql
ps -ef | grep mysql
If you still have no clue you might post the output to those commands here. Also to paraphrase Alex Trebek, please phrase your post in the form of a question. What are you expecting to see?
My PATH was correct, however it was getting overridden by a PATH var lower in my .zshrc file
# User configuration
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# export MANPATH="/usr/local/man:$MANPATH"
After commenting out that line, mysql works again.

mysql 5.1.59 won't start on Mac OS 10.7 at startup

When I reboot, mysql 5.1.59 is not running despite Activity Monitor showing 2 mysql PIDs. IF I quit the 2 mysql instances, I am able to startup mysql in Webmin (working PID is 3735, see below).
When I run this in Terminal: ps axu | grep mysql
I get:
root 3261 0.0 0.0 2435492 932 ?? Ss 9:52AM 0:00.03 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
admin1 3843 0.0 0.0 2435492 348 s000 R+ 9:56AM 0:00.00 grep mysql
_mysql 3735 0.0 0.3 2522936 13680 ?? S 9:53AM 0:00.04 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --log-error=/usr/local/mysql/data/macpro.local.err --pid-file=/usr/local/mysql/data/macpro.local.pid --socket=/tmp/mysql.sock --port=3306
Why do there seem to be 3 instances (3 users) here?
I assumed that my file:
com.mysql.mysql.plist
in
Library/LaunchDaemons
would be the only method that mysql launches at startup. I do not use the mysql PrefPane (never worked anyway), nor are there any mysql items in Library/StartupItems.
Any help would be great. Thanks!