Can't create MySQL DB from SSH

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tspilman
    Junior Member
    • May 2004
    • 21

    #1

    Can't create MySQL DB from SSH

    I'm trying to create a new MySQL DB from SSH. So i log into SSH with my CPanel account user/pass and do this...

    mysqladmin create mydbname

    I get the following error...

    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user: 'myusername@localhost' (Using password: NO)'

    I tried using -p and -u to set the username and password again, but that doesn't seem to work either.

    Is creation and administration of MySQL via SSH just not supported?
  • Pedja
    Senior Member
    • Mar 2004
    • 329

    #2
    You cannot create DB that way. you have to do it in CPanel.

    Comment

    • Jonathan
      Senior Member
      • Mar 2004
      • 1229

      #3
      yep ~ I also learned this;
      anything BUT the mySQL section
      of cPanel and it'd not work
      "How can someone be so distracted yet so focused?"
      - C

      Comment

      • tspilman
        Junior Member
        • May 2004
        • 21

        #4
        Major bummer. Ok. Anything else that one would think could be done via SSH that i can't do? I mean lets get this all documented somewhere.

        Comment

        • -Oz-
          Senior Member
          • Mar 2004
          • 545

          #5
          You are in a jailed enviroment, so anything that would require root access you can't do, this includes installing some things.
          Dan Blomberg

          Comment

          • openbox
            Senior Member
            • Mar 2004
            • 238

            #6
            The jail (it's not a "real" jail) really has nothing to do with it, but having root, or other user permissions does. My guess/understanding is that cPanel has the necessary permissions (or escalates to root) to execute certain things. After all, that's what the control panel is for. You wouldn't want every user running around with root-like permissions and shell access.

            Comment

            • chrisd
              Member
              • Mar 2004
              • 44

              #7
              Originally posted by openbox
              My guess/understanding is that cPanel has the necessary permissions (or escalates to root) to execute certain things.
              The user would need full privileges (or at least select, insert, and perhaps delete) to the mysql database -- not the product, but the tables, e.g., db, tables_priv, etc., within that db). IMO that would be a bad thing.

              If you're coming from an MS world, think sa and dbo.

              And yes, I do believe there's cpanel master config value that it uses to flip-over to when creating MySQL databases.

              Comment

              Working...