SQL issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The Republican
    New Member
    • Mar 2004
    • 4
    • 4.1.x

    [Forum] SQL issue

    I'm running vB 4.1.12. The hard drive that the SQL database was running on had a failure and we had to switch to another drive. We were able to mount the old hard drive to the system. I copied the vB database over to the new drive in the same exact path, however, I get this error when attempting to access:

    #1017 - Can't find file: './directory/aaggregate_temp_1341591000.frm' (errno: 13)

    I get that error for every table. I know this probably should be in an SQL support forum somewhere, but I figured someone here has enough SQL experience to help with this.

  • kh99
    Senior Member
    • Aug 2009
    • 533

    #2
    errno 13 is a permission error. I'm don't know a lot about MySQL admin, but maybe check the owner/permissions on the new files and make sure they match the old ones.

    Comment

    • Dustin L.
      Senior Member
      • Mar 2011
      • 639
      • 4.2.X

      #3
      If you're on CentOS, are you running SELinux?
      http://quikmsg.net/strtoupper/ - Convert lowercase text and code to all uppercase!
      http://quikmsg.net/strtolower/ - Convert uppercase text and code to all lowercase!

      Comment

      • The Republican
        New Member
        • Mar 2004
        • 4
        • 4.1.x

        #4
        Originally posted by Dustin L.
        If you're on CentOS, are you running SELinux?
        Nope, Debian 6.

        Comment

        • Dustin L.
          Senior Member
          • Mar 2011
          • 639
          • 4.2.X

          #5
          Well, it is a permissions issue. Do you have access to SFTP/SSH?



          Dustin
          http://quikmsg.net/strtoupper/ - Convert lowercase text and code to all uppercase!
          http://quikmsg.net/strtolower/ - Convert uppercase text and code to all lowercase!

          Comment

          • The Republican
            New Member
            • Mar 2004
            • 4
            • 4.1.x

            #6
            Originally posted by Dustin L.
            Well, it is a permissions issue. Do you have access to SFTP/SSH?



            Dustin
            Yep. I have access to everything.

            Comment

            • Dustin L.
              Senior Member
              • Mar 2011
              • 639
              • 4.2.X

              #7
              Okay. As always, make a backup of your entire database before doing this.

              You'll need to log-in to MySQL from the command line, and then we're going to create a new user with permissions using the command below. This will also be the user you should put into the vBulletin configuration file.

              Code:
              grant all privileges on yourdatabase.* to yourdesireduser@"localhost" identified by 'yourpassword';
              Replace yourdatabase with the name of your database, replace yourdesireduser with the desired name of a new MySQL user, if needed, replace localhost with the address to your MySQL server, and replace yourpassword with the password you desire the new MySQL user to have.

              See if that does it.



              Dustin
              http://quikmsg.net/strtoupper/ - Convert lowercase text and code to all uppercase!
              http://quikmsg.net/strtolower/ - Convert uppercase text and code to all lowercase!

              Comment

              • The Republican
                New Member
                • Mar 2004
                • 4
                • 4.1.x

                #8
                Originally posted by Dustin L.
                Okay. As always, make a backup of your entire database before doing this.

                You'll need to log-in to MySQL from the command line, and then we're going to create a new user with permissions using the command below. This will also be the user you should put into the vBulletin configuration file.

                Code:
                grant all privileges on yourdatabase.* to yourdesireduser@"localhost" identified by 'yourpassword';
                Replace yourdatabase with the name of your database, replace yourdesireduser with the desired name of a new MySQL user, if needed, replace localhost with the address to your MySQL server, and replace yourpassword with the password you desire the new MySQL user to have.

                See if that does it.



                Dustin
                Gave that a try.. still the same error.

                Comment

                • Dustin L.
                  Senior Member
                  • Mar 2011
                  • 639
                  • 4.2.X

                  #9
                  Hmm, that's odd.

                  This is going to sound stupid, but have you tried restarting the MySQL daemon?

                  You can do so via SSH:

                  Code:
                  /etc/init.d/mysqld restart


                  Dustin
                  http://quikmsg.net/strtoupper/ - Convert lowercase text and code to all uppercase!
                  http://quikmsg.net/strtolower/ - Convert uppercase text and code to all lowercase!

                  Comment

                  • kh99
                    Senior Member
                    • Aug 2009
                    • 533

                    #10
                    I think granting permissions didn't work because the problem isn't mysql permissions, it's OS file permissions. i.e, whatever user/group the mysql server process is running as doesn't have the necessary permissions on the files/directory structure that were created on the new drive.
                    Last edited by kh99; Wed 11 Jul '12, 3:57am.

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    😀
                    😂
                    🥰
                    😘
                    🤢
                    😎
                    😞
                    😡
                    👍
                    👎