fdev / phpmyadmin-cli

Bringing phpMyAdmin to the command-line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Canot select db

RatkoD opened this issue · comments

No matter how I run the phpmyadmin-cli, it seems like I cannot select db so that I can run query:

phpmyadmin-cli -l http://myPhpMyAdmin/ -u user -p password -e ' SELECT * FROM users'
Enter password:
ERROR #1046 - No database selected

phpmyadmin-cli -l http://myPhpMyAdmin/ -u user -p password -e ' SELECT * FROM users' mydb
Enter password:
ERROR #1046 - No database selected

"No database selected" usually means there is no database with the given name.
Which version of phpmyadmin are you using?

I'm trying to connect to

Version information: 4.5.3.1

I've finally managed to connect using the client after removing the default table selectin in line 144 from the script ('table' : 'article',), and setting my table of interest, but when I try to execute query "SELECT * FROM users" I get: Unable to perform query. I cannot execute any query.

I suspect the tool isn't compatible with phpMyAdmin 4.5.x. For now I suggest you just use the mysql cli, if possible.

Unfortunately, I don't have access to mysql nor ssh to the server, that is why I was hoping that I could use this tool which is need for my automated test script :( Is there any other tool that you know of or maybe you plan on updating the tool?

The latest version is now compatible with phpMyAdmin 4.5.x. I tested it locally with version 4.5.5.1 and could perform all functions.

Yes, it works now, thanks a lot @fdev!