Having connection or reading/writing problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blakekr
    Member
    • Dec 2004
    • 30

    #1

    Having connection or reading/writing problems

    I haven't used this host for long, and I'm not familiar with the environment yet.

    Anyway, I was trying to install a popular php/mysql article package and got an error saying it could connect to the database I'd just created, but couldn't read or write from the tables.

    I was going to test a mysql connection from the command line (jail) but got "connection refused." Is this because jail env. doesn't allow shell mysql commands?

    thanks,
    blake
  • Buddha
    Senior Member
    • Mar 2004
    • 825

    #2
    Probably need some more details, like how you created the database and what script?

    However, the most common mistake is not creating the database through cPanel first.
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

    Comment

    • Jonathan
      Senior Member
      • Mar 2004
      • 1229

      #3
      Or not adding the user, or using incorrect format for the username.
      The database and users are formated as: cpanel-usr-name_db-usr-name
      "How can someone be so distracted yet so focused?"
      - C

      Comment

      • blakekr
        Member
        • Dec 2004
        • 30

        #4
        No, see, if I put in the wrong username or password, it doesn't connect.

        In this case it connects to the database just fine, but reports a read/write error. The database was created through cpanel and the tables, by dumping a sql file into phpMyAdmin.

        The script I'm trying to install is "absolut," an article management system. Apparently some users get this error but not many. The users that do get it seem to all be using cpanel. That's why I thought I'd test from the command line, but I get an error when trying to do that in shell.

        Comment

        • sdjl
          Senior Member
          • Mar 2004
          • 502

          #5
          You have assigned the username to the database in cPanel right?
          -----
          Do you fear the obsolescence of the metanarrative apparatus of legitimation?

          Comment

          • blakekr
            Member
            • Dec 2004
            • 30

            #6
            Yes, exactly, and like I said, if I put the user name in wrong (forget to add the accountname_ prefix, for example), it won't connect. It's odd.

            Comment

            • Jonathan
              Senior Member
              • Mar 2004
              • 1229

              #7
              Make a new database, new user and add it.
              Make a table in phpMyAdmin by hand.

              Then try to use cmd to connect and what not.
              See if same error. If so, submit a ticket I s'pose.
              "How can someone be so distracted yet so focused?"
              - C

              Comment

              • blakekr
                Member
                • Dec 2004
                • 30

                #8
                So I *should* be able to connect to these databases on the command line, through the shell interface? Is that right?

                Or to get really specific, should I be able to log in via secureSH and enter "mysql --username=blah --password=blah" and get an appropriate response from mysql? Because when I tried that, it didn't work.

                If it should work, then that gives me a lot to work with in terms of testing.
                Last edited by blakekr; 01-01-2005, 10:43 AM. Reason: s

                Comment

                • Jonathan
                  Senior Member
                  • Mar 2004
                  • 1229

                  #9
                  I've used Shell to work with MySQL, mainly since the first
                  PHP book I got introduced you to MySQL using the consol.
                  "How can someone be so distracted yet so focused?"
                  - C

                  Comment

                  • sdjl
                    Senior Member
                    • Mar 2004
                    • 502

                    #10
                    I can use MySQL via shell fine although i use different flags:
                    Code:
                    mysql -u USERNAME -p -D DATABASE
                    Then enter the password when prompted.

                    David
                    -----
                    Do you fear the obsolescence of the metanarrative apparatus of legitimation?

                    Comment

                    • blakekr
                      Member
                      • Dec 2004
                      • 30

                      #11
                      Ahh, very helpful, I'll try that. TTThanks!

                      Comment

                      Working...