OpenVZ Forum


Home » General » Support » Cannot use msql -e "<some sql commands>" with vzctl exec
Cannot use msql -e "<some sql commands>" with vzctl exec [message #50706] Wed, 16 October 2013 11:00 Go to previous message
proxmoxUser is currently offline  proxmoxUser
Messages: 2
Registered: September 2013
Junior Member
Hello everyone,

I am managing 2 proxmox host nodes with about 50 containers running on both, each one of it running Mysql. In order to use it in a script, i would need to list databases names of each containers' mysql.

To do that, i tried to use :
#Firstly
vzctl exec 152 mysql -u root --password=xxxxxxxx -e "SHOW DATABASES;"
ERROR 1049 (42000): Unknown database 'DATABASES'

#and then
root@myserver:# vzctl exec 152 /bin/bash --login -c "mysql -u root --password=xxxxxxxxxx -e 'SHOW DATABASES;'"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


even though :
root@myserver# vzctl enter 152
entered into CT 152
root@CT152:/# mysql -u root --password=xxxxxxxx -e "SHOW DATABASES;"
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| mybdd1             |
| mybdd2             |
+--------------------+


I don't know if this is a bug, or this is a normal behavior of the system, but if it is not a bug, I could really not guess why this is happening.

So does someone knows if doing this is possible ? If so could you tell me how I can ?

Anyway does also someone can explain this behavior of vzctl to me ?

It would be great !
If this is not a normal thing happening on my server, I will post an issue on BugZilla, but I don't want to spam the platform.

Thank you very much in advance !

RĂ©mi
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: What are recommended Disk settings for a DB server?
Next Topic: Debian 7 (wheezy) in a 32-bit hardware node
Goto Forum:
  


Current Time: Fri Oct 18 15:12:30 GMT 2024

Total time taken to generate the page: 0.05053 seconds