WebFaction
Community site: login faq

I have several mysql databases. When logged into the server via SSH, how can I get a list of these from the command line?

asked 30 Aug '12, 00:49

user
471219
accept rate: 0%


It's a bit ugly, but you can use the list_dbs control panel API method from the command line like this:

python -c "import xmlrpclib,pprint,getpass; pw=getpass.getpass(); s = xmlrpclib.ServerProxy('https://api.webfaction.com/'); session,account = s.login('account_name',pw); pprint.pprint(s.list_dbs(session))"

Just change "account_name" to your control panel user name, and enter your control panel password when prompted.

Hope that helps!

permanent link

answered 30 Aug '12, 08:39

seanf
12.2k31836
accept rate: 37%

Hi,

Sorry, you can't do this from the command line. You can see the databases via the control panel, or via the API function list_dbs.

permanent link

answered 30 Aug '12, 02:46

todork
1.2k4
accept rate: 34%

mysqlshow -u USER -p

permanent link

answered 26 Dec '18, 19:01

baba
47724
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×84
×4

question asked: 30 Aug '12, 00:49

question was seen: 1,848 times

last updated: 26 Dec '18, 19:01

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM