Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MySql - Bit of Help. Wordpress Install

Options
  • 06-02-2012 10:23am
    #1
    Registered Users Posts: 611 ✭✭✭


    Hi guys,
    I've recently switched from one hosting company to another. I run my site through Wordpress. I used WP Online Backup to backup all data from the old account. I've renamed everything on the new server as before so WP resides in the same folder with the same username and password.

    I've uploaded the Wordpress files from the old server into the folder on the new server but as I understand it I need to upload the database now. I've tried to import the database using MySqladmin but I will admit that I have zero experience of database end stuff.

    I have tried importing into the Wordpress database but no joy. I've tried creating a new database but got this error:
    SQL query:
    
    CREATE TABLE  `wp_commentmeta` (
    
     `meta_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
     `comment_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT  '0',
     `meta_key` VARCHAR( 255 ) DEFAULT NULL ,
     `meta_value` LONGTEXT,
    PRIMARY KEY (  `meta_id` ) ,
    KEY  `comment_id` (  `comment_id` ) ,
    KEY  `meta_key` (  `meta_key` )
    ) ENGINE = MYISAM AUTO_INCREMENT =673DEFAULT CHARSET = latin1;
    
    MySQL said: 
    
    #1046 - No database selected
    

    I would greatly appreciate if somebody could talk me through how I go about getting the new site back up and running. I have tried for a few weeks myself, but have had no joy. I've posted on the Wordpress forums as well, but no help. I'm sure it's only something small I'm not doing and can be sorted in no time at all, by someone with a bit small bit of knowledge i.e. not me.

    Help me Boarside ones, you're my only hope.


Comments

  • Registered Users Posts: 11,977 ✭✭✭✭Giblet


    That script would create a table inside a database, but you have either no database created, or you don't have one selected to run that script into.

    Either do
    use NameOfDatabase;
    
    or
    create database NameOfDatabase;
    use NameOfDatabase;
    

    Then continue with the remaining scripts.


  • Registered Users Posts: 16,404 ✭✭✭✭Trojan


    Or even better:
    create database IF NOT EXISTS NameOfDatabase;
    use NameOfDatabase;
    

    --

    Another issue you may have to deal with is filesystem paths in synchronised data in the DB, e.g. your previous uploads location might have been "/home/username/yourdomain.com/wp-content/uploads/" and now it's "/home/username/domains/yourdomain.com/public_html/wp-content/uploads/".

    Not only do you have to change the path itself, you need to ensure you change the number which signifies the length of the string - i.e. the former is 50 characters long, the latter 70. If you search your DB for "/home/username" you'll find where these changes need to be made - the length is the number that prefixes the path data.


  • Banned (with Prison Access) Posts: 3,455 ✭✭✭krd


    I have tried importing into the Wordpress database but no joy. I've tried creating a new database but got this error:
    #1046 - No database selected
    

    I would greatly appreciate if somebody could talk me through how I go about getting the new site back up and running. I have tried for a few weeks myself, but have had no joy. I've posted on the Wordpress forums as well, but no help. I'm sure it's only something small I'm not doing and can be sorted in no time at all, by someone with a bit small bit of knowledge i.e. not me.

    Help me Boarside ones, you're my only hope.

    I do understand the error message. 'No database selected'. You have to be in the database before you can use it. If it doesn't already exist, then you can't use it.

    I'm only getting into this too, so I can't be that much help. Maybe in a few weeks. I just downloaded the Wordpress whatcha'ma'call it - this morning (I was up early) - and I'm running it on my own machine (I have Apache/Mysql/Php running already). The setup was incredibly easy.

    Here's what I think you need to do. With your new host, you'll have folder. They should be running MySql and PHP - otherwise your wordpress can't work.
    Download the Wordpress installation files from wordpress. Upload all the files to your new folder (get rid of anything you have there). Then type in the URL of your new address. This will run the installation index.php. And what you should see is a screen asking you for your databases name (it might be an idea to use the same name as the database on your old host - as you might be able to just switch it in) Then your root username and password for the site - the hosting company should have give you that. There's a little thing about WP_ that I can't remember - but your provider may have funny rules on what you can and can't call your database (there may be a conflict if other people all call their database 'wordpress').

    Anyway. What happens next. If your username and password are correct, once you hit the button, you'll be taken into the admin for your wordpress, which will be the admin for a generic page. And you can get going from there. It's probably worth trying this, just to see if the new host is working on everything.

    I'm still pretty new to this, so I'm not sure what you do then. I'm very new to wordpress (just downloaded it around 6, and it's about 9 now). It might simply be a case of copying over the old data base file into the folder - the database name may need to be the same as the admin is expecting. I'm not sure, but I think wordpress bases all it's stuff around what's in the database. So, by magic, everything may appear just as it was on the old host.

    Anyone else have any suggestions?

    I'm just hacking away at this for a minute.


  • Registered Users Posts: 4,080 ✭✭✭sheesh


    ok
    using phpadmin select appropriate database.
    select export from the drop down menu save resulting file

    in new account using phpadmin create a new database

    import the tables into the newly created database.

    I think your problem is that you did not create a new database in the new mysql program


Advertisement