Hello everyone, I hope you can help. I have just recently bought out my former business partner and am transfering my website to Dreamhost. I have uploaded all my files but am having trouble with the SQL database. I am not a technical person and thought this would be straight forward but it seems a little more complicated. I have 2 database files, 1 called weddingphotography_admin.sql and the other called weddingphotography.sql

The MySQL server confuses me a little as I am not sure how to set up my database or check if it is working. Also what is the hostname as I have the info for the database but it also asks to be linked to a hostname?

If anyone can help please give it to me in 5 year old format as I am not completely familiar with the system.

[quote=“andwhi27, post:1, topic:55357”]
Hello everyone, I hope you can help. I have just recently bought out my former business partner and am transfering my website to Dreamhost.[/quote]

Congrats.

[quote]
I have uploaded all my files but am having trouble with the SQL database. I am not a technical person and thought this would be straight forward but it seems a little more complicated.[/quote]

Aint it always the case.

[quote]
I have 2 database files, 1 called weddingphotography_admin.sql and the other called weddingphotography.sql [/quote]

Ok, down to biz. Do you know what program or utility was used to generate those files, and if not, usually the code that creates these will put some comments at the top of the file. Post those first few lines of the file here if you’re not sure.

[quote]
The MySQL server confuses me a little[/quote]

I feel the same way about diesel engines.

[quote]
as I am not sure how to set up my database or check if it is working.[/quote]

Fortunately, DH finally decided to un-bury the database management option in the control panel and it’s now in the upper left corner under the “Toolbox”. You can do pretty much anything you need to from the “MySQL Databases” option.

Also what is the hostname as I have the info for the database but it also asks to be linked to a hostname?

The hostname is going to be mysql.yourdomain.com (provided you’re not trying to use a subdomain which I’m gonna assume not for now). With any luck no one has already used your database or user names on the server and it should be reasonably straightforward.

Also, bad luck notwithstanding, your database .sql dumps were created with the “phpmyadmin” web tool and should be relatively simple to import once you’ve created the databases.

Which leads to step 1:
Create the databases with the names in the files you have: weddingphotography_admin and weddingphotography. You will also need to have a username/password combination for each database - the same user can be assigned to both if your web application allows for it.

If you get past that, you can do the next bit and log into the “phpMyadmin” links for the respective databases to “import” the files. After that its just a matter of making things match up to those credentials in your web application (whatever that may be) and you’re online.

If anyone can help please give it to me in 5 year old format as I am not completely familiar with the system.

[quote=“andwhi27, post:1, topic:55357”]
Hello everyone, I hope you can help. I have just recently bought out my former business partner and am transfering my website to Dreamhost.[/quote]

Congrats.

[quote]
I have uploaded all my files but am having trouble with the SQL database. I am not a technical person and thought this would be straight forward but it seems a little more complicated.[/quote]

Aint it always the case.

[quote]
I have 2 database files, 1 called weddingphotography_admin.sql and the other called weddingphotography.sql [/quote]

Ok, down to biz. Do you know what program or utility was used to generate those files, and if not, usually the code that creates these will put some comments at the top of the file. Post those first few lines of the file here if you’re not sure.

–
– Database: weddingphotography_admin

Also what is the hostname as I have the info for the database but it also asks to be linked to a hostname?

The hostname is going to be mysql.yourdomain.com (provided you’re not trying to use a subdomain which I’m gonna assume not for now). With any luck no one has already used your database or user names on the server and it should be reasonably straightforward.

Also, bad luck notwithstanding, your database .sql dumps were created with the “phpmyadmin” web tool and should be relatively simple to import once you’ve created the databases.

Which leads to step 1:
Create the databases with the names in the files you have: weddingphotography_admin and weddingphotography. You will also need to have a username/password combination for each database - the same user can be assigned to both if your web application allows for it.

If you get past that, you can do the next bit and log into the “phpMyadmin” links for the respective databases to “import” the files. After that its just a matter of making things match up to those credentials in your web application (whatever that may be) and you’re online.

Mmmmm… it looks like someone else has 1 of the database names ‘weddingphotography’. Can I change the database name or do I need to do this in a lot of different files as well?

–
– Database: weddingphotography_admin

Excellent. That should work well.

Mmmmm… it looks like someone else has 1 of the database names ‘weddingphotography’.

Gah. Hate when that happens, but can’t say as I’m terribly surprised. Obviously you’re going to have to rename the database. In fact, It might be better to rename both, but that’s a tough call without knowing if you’re using an application that’s conducive to switching db names.

Can I change the database name or do I need to do this in a lot of different files as well?

Can’t speak to that. Most applications I’ve programmed have the database name set in a single piece of code that is distributed among all programs - hopefully that’s your case as well but “your mileage may vary”.

Now that’s a bit odd. I’m thinking it’s possibly because you haven’t created a database yet and phpMyadmin needs at least one database with its associated username/password to function (…also, make sure you have allowed dreamhost to open new windows/tabs/pop-ups in case some pop-up blocker software is stifling the process).

Add a database like “weddingphotographyiii” (where “iii” is your initials or some other unique thingamabob), get a username and password associated with it then take a whack at the phpmyadmin link.

Once you’re (hopefullly) there, across the top you’ll see a “tab” devoted to “Import” that will allow you to import the .sql file from your local machine. If ya get it, then we can see what kind of other programming machinations may be necessary.

–
– Database: weddingphotography_admin

Excellent. That should work well.

Mmmmm… it looks like someone else has 1 of the database names ‘weddingphotography’.

Gah. Hate when that happens, but can’t say as I’m terribly surprised. Obviously you’re going to have to rename the database. In fact, It might be better to rename both, but that’s a tough call without knowing if you’re using an application that’s conducive to switching db names.

Can I change the database name or do I need to do this in a lot of different files as well?

Can’t speak to that. Most applications I’ve programmed have the database name set in a single piece of code that is distributed among all programs - hopefully that’s your case as well but “your mileage may vary”.

Now that’s a bit odd. I’m thinking it’s possibly because you haven’t created a database yet and phpMyadmin needs at least one database with its associated username/password to function (…also, make sure you have allowed dreamhost to open new windows/tabs/pop-ups in case some pop-up blocker software is stifling the process).

Add a database like “weddingphotographyiii” (where “iii” is your initials or some other unique thingamabob), get a username and password associated with it then take a whack at the phpmyadmin link.

Once you’re (hopefullly) there, across the top you’ll see a “tab” devoted to “Import” that will allow you to import the .sql file from your local machine. If ya get it, then we can see what kind of other programming machinations may be necessary.

I have now renamed the database and created both on the system and still the Mysql.thisisweddingphotography.co.uk isnt working. Could it be because I havent had the domain transferred yet?

I have now renamed the database and created both on the system and still the Mysql.thisisweddingphotography.co.uk isnt working. Could it be because I havent had the domain transferred yet?

Andy

If you didn’t at least update the name servers to point to dreamhost it will not work until you do. And it may take some time for the change to propagate too once you have.

I would suggest that in the meantime you add a dreamhosters sub-domain (i.e. mysite.dreamhosters.com) and make it a mirror of your domain name. That way you can work on your website accordingly using the sub-domain until you get the dns of your domain name straightened out. You would just need to remove any references to the sub-domain once the switchover is complete but at least you would be able to really work on your site.

I have now renamed the database and created both on the system and still the Mysql.thisisweddingphotography.co.uk isnt working. Could it be because I havent had the domain transferred yet?

That’ll definitely put a damper on things.

You can either set the DNS entries to the DH servers or add entries to your local hosts file for the SQL server. Since you’re a self-professed novice I’d suggest the former. You can always set it back to what it was later though it does usually take about 12-48 hrs for changes to fully propagate (tough to say for non-US sites, but sometimes mine push out in as little as 4 hours).