No announcement yet.

Moving webhosting account.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving webhosting account.

    I'm a new customer moving my site lock stock and barrel from another UK web host. My website is presently still being hosted live with the previous hosting company. I am in the process of uploading everything to here.

    I had no problem importing a DB with the Plesk interface. My query is regarding the naming of databases and whether or not i am going to have to manually amend scores of PHP scripts that interact with my DB's.

    When i was importing a DB it had the box to name it, however it was prefaced with 'XXXX3_' My fear is that every script which contains the 'MySql_connect' and 'MySql_select_db' commands are going to have to have several parameters renamed. I'll try and explain a bit better below. (the XXXX3 is the plesk login name, not the actual one of course)

    My previous host required the following in the script;

    (Example 1)For connecting to the DB server:
    $conn=mysql_connect("localhost", "sitename_net", "password")

    (Example 2)For connecting to the particular DB:
    $rs=mysql_select_db("sitename_net_1", $conn)

    (Example 3)For selecting the particular table in the query:
    $sql=stripslashes ("select * from table_name where.....

    In ex.1 would i be able to keep the 'localhost' and 'sitename_net' parameters as they are?

    In ex.2 I ask the same query for 'sitename_net_1' ,or will the instance in each and every script have to be altered to 'XXXX3_dbname'

    Basically i mean, should i in the Plesk box that presents itself to name the DB, erase the preinserted 'XXXXX3' and just type in the reference that already exists in all of my scripts?.

    In ex.3 i presume there is no problem keeping the table name that has been imported within the DB via Plesk interface.

    If you need clarification because what i've asked is as clear as mud, please ask.

    The interacting (php scripted) web pages allows a visitor to the page to search a database using various fields.
    Last edited by perplexed; 21-01-09, 05:13 PM.

  • #2
    Hi Paul,

    To be simple enough.. just remove the pre-inserted value which is present in the input box when creating the database & input only the name of the database in there
    Kind regards,
    Jack Daniel.

    Cloud Hosting || Managed Dedicated Server || Webhosting UK Knowledgebase


    • #3
      I also had a similar problem moving from my last host. I now have all connection details to mysql in a seperate file and use 'require_once' to call the user,pass, etc. That way I only need to edit one file per db


      • #4
        Thanks for the quick responses above.

        Fingers crossed i'm not putting a hoodoo on myself before i'm actually up and running on the UK Webhosting servers but the chat, telephone, email and this forum support seems very promising. Especially more so when the query posed isn't clearly stated lol. I'm already recommending the hosting service to many others who have been shipwrecked from the collapse of my previous hosting company.

        I won't be able to test the above solutions until i've cut my ties with Lycos, my site is still on their nameservers.

        Great news about being able to delete the pre-inserted value. Hopefully, that means i don't have to trawl through each php script i compiled.

        I constructed my database and interacting web page search forms when i was still stuggling to grasp basic HTML code lol. I am nowadays aware of the time-saving 'include file' function in php which would enable me to make instant changes across all scripts by altering just the one file.

        The database in question is one that covers a couple of thousand music scores that i possess and is actually for private use and password protected. I search and locate the physical location of any score via a web page form.


        • #5
          Hi Paul,

          You are most welcome to ask our support staff through livechat, ticket system or phone if you need our help. We can assist you with migration of your data from Lycos servers if you are finding it difficult to migrate on your own.
          Web Hosting UK - ASP MSSQL Hosting - cPanel Linux Hosting
          AIM : webredback || msn : andrew @
          Toll Free : 0808 262 0855