Jump to content

Content Management System


emvy03

Recommended Posts

Alright Lads.

I've had a go at building a CMS using an apache server, but this is all local to my PC and I was wondering how to go about uploading it to the internet.

The problem I think I am having is that I am using phpmyadmin locally, however when I upload the cms to the internet it tells me that it failed to connect to the database. I assume this is due to the fact the CMS is online, while the database is still saved locally.

Apologies for asking such a daft question but I am really quite new to php scripting and web design.

Cheers.

 

Link to comment
Share on other sites

Ok, where are you 'uploading' your cms to? and does your web hosting have mysql support / databases . If so then you need to:

1. export your local database into an sql file.

2. change your connection details in your php connection script to match youronline databases mysql users details

3. import your sql file into the online database

Link to comment
Share on other sites

Pretty much what gristoi said, you should use mysql dump (http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html) to create the sql file.  You can probably use the PHPMyAdmin GUI as well if that's easier.  After you dump your database live your hosting panel should allow you to create MySQL users, from there you just have to change your configuration script with the new credentials.

Link to comment
Share on other sites

Hi,

Thanks for that guys. Also, I was wondering if there is a way to assign an id to a post when adding it to the database. The reason I ask is the current 'add-content' script doesn't assign an id to the posts and therefore the database won't accept the new post because the 'id' column can't be null.

 

Hope I've explained it at least a little.

Cheers guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.