Skip to main content

Problem moving my database to a new server

Comments

9 comments

  • cPanelMichael
    Hello :) Have you considered having your hosting provider transfer the account for you using the transfer utility in Web Host Manager? This will copy all data over automatically, and they can then modify the account to the new domain name. Thank you.
    0
  • lmstearn
    Please forgive the necro, the OP's scenario is similar to mine, here, the additional concern being the target provider is not wont to provide assistance in favour of suggesting a consultation with an outside agent, (Source host iiNet, Dest: TPP). Right now, the WP files are copies over, and the db is sitting in the public_html
    (wp root) directory. Problem already, as WP was inside an httpdocs
    directory at source. Various things have to happen in wp_config.php
    , that may not be enough though. There is an issue logging onto WHM, so the best shot was to install MySQL in Windows and attempt to open the DB there to create a new (Dest) user. Once the user is added, the import DB function in Databases should not emit a user access error at least. Something else may go wrong, of course. After opening the DB file in MySQL Workbench all that appears in the gui is a large dump. What next? These steps/processes may be ill advised after all, there doesn't appear to be a step by step walkthrough for this scenario, even given the documents at TPP are extensive and well laid out. If an outside agent is the last resort, can something else be performed to "easily" to get the site up? Thanks. :)
    0
  • cPRex Jurassic Moderator
    @lmstearn - I'm not entirely sure what issues you're experiencing, but having the database data is at least half the battle. If this is a database dump, can you import it to the database properly through PHPMyAdmin?
    0
  • lmstearn
    Hi @cPRex, the problem is the same as above: [QUOTE] #1044 - Access denied for user 'cpses_xzjbdzyky0'@'localhost' to database 'db1167285_wordp'
    In creating the cpses_xzjbdzyky0 user (which probably should be xzjbdzyky0 please verify) for MySQL on the PC and giving it SUPER privilege still didn't work with the password when connecting to the DB in Workbench. [QUOTE] Please: 1 Check that MySQL is running on address localhost 2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed) 3 Check the user cpses_xzjbdzyky0 has rights to connect to localhost from your address (MySQL rights define what clients can connect to the server and from which machines) 4 Make sure you are both providing a password if needed and using the correct password for localhost
    connecting from the host address you're connecting from
    Does MySQL actually link to the Windows user accounts and bind them to localhost
    ? Might be the problem. Anyhow, barfed MySQL by removing all permissions from root, so a bit of work to do. :oops:
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. Anytime there is a "cpses" user, we expect that to be temporary, and not something you should have to create. There is nothing involved with Windows on a cPanel server, so I don't understand the second part of that question.
    0
  • lmstearn
    Thanks, it was about users in MySQL (Workbench) and Windows users, and no, it's fine. The RC version of MySQL installed by mistake was a bit buggy as well. Please feel free to split this off into another thread, as the following now relates to issues in the import. As regarding MySQL 8.035 WB operations, firstly regarding the file size of the databases, the original one (v 4.9.0.1) is of 8.78mb, compressing to around 2mb in zip. The one generated from MySQL WB is under 600k and zips to under 70kb. There is no references to anything of the form wp_ in these smaller files at all, so something in the versioning is broken. :eek: The process of attaching to the DB & server in the WB setup here is the first suspect off the rank. Will the import actually complete successfully on the action of creating a user ' xzjbdzyky0' with GRANT_ALL corresponding to the cPanel account. Any mismatches on whether it's @ 'localhost' or '%'? In the import process of the smaller files, something cropped up with character set usability. Have at OneDrive a zip of the two exported DBs, one is clean from the export, the other includes edits following Googled suggestions like this. The last error in the edited file from phpMyAdmin is the following: [QUOTE] Error Static analysis: 1 errors were found during analysis.
      ]
    • Unrecognized statement type. (near "DEFAULT" at position 112)
    SQL query: Copy CREATE DATABASE IF NOT EXISTS `sys` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8_general_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; MySQL said: alt="Documentation">https://cpanel-501-melb.hostingww.com:2083/cpsess7847858335/3rdparty/phpMyAdmin/themes/dot.gif
    #1253 - COLLATION 'utf8mb3_general_ci' is not valid for CHARACTER SET 'utf8mb4'
    Stumped, as utf8mb3_general_ci
    is in the internal configuration, and not in the file. Tried with the following uncommented lines: [QUOTE] 40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; 40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; 40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION; 50503 SET NAMES utf8;
    The content in the file being what it is, no difference unsurprisingly. What do you think is the best way around it? Edit: Ehm, the migration wizard in Workbench for the old file was a better bet, albei with worse results, installing MySQL 5.* didn't make any difference as AFAICS WB never detected it. Mo matter, the 1045 permissions error is explained in a comment at this post: [QUOTE] This error message says you could not access mysql, not the file. You need the correct username and password. Having said that, shared database plans rarely give you access to load data statement.
    Applies here, unfortunately, at least we are close to journey's end and over to one with WHM access for the job!
    0
  • cPRex Jurassic Moderator
    Whenever a MySQL user is created in cPanel it gets several different access hosts. On my personal server, I see the following in the "host" column for one user: hostname main.ip.address localhost For the character set, you can try adjusting this per-domain using the following details:
    0
  • lmstearn
    All sorted, the DB name and usernames required the userid prefix, and there was an error in wp-config.php which caused the 500 error. :)
    0

Please sign in to leave a comment.