Jump to content

Recommended Posts

Posted

I have a few questions regarding my database for a forum.

First of all, is there a way to check and see what language my database shows and if it's showing English-utf8, can I change it to English?

Second, can you create a new database for a working forum and transfer all content into the new database?

 

The reasons for my questions is because I have a forum set up on SMF. I orginally did this using Fantastico and it set everything up using English-utf8.

I recently upgraded the program and did it all manually but I'm not sure if my database changed to the correct language.

My forum says I'm using English but I added a mod and it's showing utf8.

Sheryl

Posted

Why are you trying to change the charset from UTF8?

 

UTF8 is very much the preferred encoding for a lot of websites. You can't just change to 'English' you would have to change to a different charset but I don't know why you would want to do that unless you're site is predominantly in a language such as hindi...

 

 

 

How large is your database? There are queries that can be run which will create a copy of a database, but if you have thousands of rows in your db you are likely to lock the tables and thus your site will be unable to contact your database until the query has complete. Talk to the help desk and they will be able to transfer data without locking the tables for as long from the command line (I guess)... if you are not sure what you are doing though Bruce is correct, best not to fiddle.

Posted

I don't really know what I'm trying to do.

I installed a mod on my smf forum that lets you create portals and the editor is showing English utf8 even though my default language is English.

I'm missing a block in the editor and I was thinking it could be because it's trying to use utf8.

The only language I use is English and someone at smf said it's best not to install utf8 and you really only needed it if you're going to install other languages.

Since I'm not going to install more languages, I figured they're right that I don't need it.

 

I have no idea how many rows I have. Is there a way to check that?

I know there's 146 tables if that means anything and I see the two tables for this mod use utf8_general_ci for the collation where as all the other tables show latin1_swedish_ci.

 

Is there a way I can change the collation on those two tables? I guess that's really what needs to be done.

 

I've been trying to get some help on this and one person said I could fix everything if I set up a new database and uploaded my old database into this new one, however, I don't see how that will fix those two tables that are using utf8.

 

This is all Greek to me.

Sheryl

Posted

If you just want to convert two tables to a different character set then this command can be run from within PHPMyAdmin

 

>ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;

 

 

If you want to convert to latin1_swedish_ci it will be

 

>ALTER TABLE tbl_name CONVERT TO CHARACTER SET latin1;

 

If you wish to change the character set of just particular columns in a table then do this:

 

>ALTER TABLE tbl_name MODIFY col_name TEXT CHARACTER SET latin1;

 

NOTE: Where it says TEXT above you need to put the data type of the column, i.e. text, integer, varchar(200), BLOB etc etc...

 

 

Before doing any of this take a backup of your db though.

Posted

I'm not sure how to actually do this.

I noticed I could click on one of the tables I want to convert to latin1_swedish_ci and then click "structure" and it brings up a page that says you can edit the lines on this particular page.

The page brings up a list with different fields on the left. Not all of them have something listed under collation but would I click the fields that do show a collation and then click change?

I see if I click change, it brings me to an area with a drop down list of collations to pick.

 

Would I pick latin1_swedish_ci if that's the collation I want and do it for any field that shows utf8?

I don't want to make any changes until I'm sure I know I'm doing this right.

 

Sheryl

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...