Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Set Default Collation


However I recently tried MySQL 4.1.x and noticed that there have been some changes. My questions are:-

1) The default collation setting is Latin1_swedish_ci. What do I need to change this to in order for my old tables to import correctly? Currently special chars like tm <- trademark import as ? <-Question Marks?

2) How do I set my own default?

3) Is there any way to export a new database back to an old version of MySQL eg 4.1.x -> 4.0.x?




View Complete Forum Thread with Replies

Related Forum Messages:
Default Charset/collation In Mysql
My language is Farsi and since I was using previous versions of MySQL, I had no problem. But upgrading to 4.1, I notice that character "Ý" is not displayed the way it should be. After reading chapter 10 of mysql manual, I sent this query after connecting to my database in PHP, and I have no problem:


$res = mysql_query("SET NAMES 'utf8'");
if ( !$res )
{
print "<pre>" . mysql_error() . "</pre>";
}


The thing is that I really do not wana send it in my PHP code, since I have some scritps that I'm not allowed to modify, so, I tried starting mysqld with the default-character-set option, just like:


mysqld_safe --default-character-set=utf8 --default-collation=utf8_general_ci &


and it really works fine. I even checked the Server Variable and Settings in phpMyAdmin and everything is set to utf8. But you know what? My code still doesn't work if I remove the first code that I wrote in here, I mean if I don't send that query (SET NAMES 'utf8'), I was wondering why? I mean it's working, as the server variables show, but then they have no effect. What should I do.

View Replies !
Setting The Default Collation For A Specific Connection?
Is it possible to set the default collation for a MySQL connection? (I have MySQL 4.1.22)

I know you can use SET NAMES 'utf8'; for the character set, and can set the collation and character set for the whole server with my.cnf:

default-collation=UTF8_general_ci
default-character-set=UTF8

But is there any way to set the collation for a connection without editing my.cnf? Such that all CREATE TABLE queries and such on that connection automatically use utf8_general_ci as the default collation, rather than latin1_swedish_ci? (without adding DEFAULT CHARSET to each create table query)

View Replies !
How To Add New Collation For A Utf-8?
I'm trying add a new collation support for our language encoded in
utf-8. But I can't seem to find appropriate documentations for the
processes that needed to be taken.

View Replies !
What Should Be Collation Set To?
In the latest version of phpMyAdmin there is a field "collation". What is it and what should it be set to>

View Replies !
How To Use Collation
Can someone clarify what collation is all about and if I should use it and how? I use utf8_unicode_ci but is this good?


View Replies !
Collation??
My webhost installed a new version of PhpMyAdmin a few months ago. When I try to create a field in a table I see a dropdown list named: Collation. What is this?

View Replies !
What Collation Is Best To Use?
What collation is best to use? My site is English and i believe i should be using utf8_general_ci but am not sure.

Can someone advise me on the best collation to use. My database will be including html character codes.

View Replies !
How To Change Collation ?
How do I change the collation on existing tables in an existing database?

View Replies !
Best Utf8 Collation
I'm not sure which utf8 collation to use for mysql server.
It's probably going to be one of these 3 but I have no idea what the difference is.
utf8_general_ci, utf8_unicode_ci, utf8_bin

View Replies !
Change Collation
We are using two systems, one has mysql4.0 and the other has mysql 5.0.
One v5 table does not seem compatible with v4, because a field is created with collation 'latin1_swedish_ci'.
When, in phpadmin(2.6.3-pl1), I try to remove the collation, it won't let me.
Question: what collation type must I select, so mysql4 is able to use the tables?

View Replies !
Dataset Collation
I am using phpMyAdmin for a database and when creating a new table it ask me to specify the table's "collation". I am a bit baffled on this and if someone might shed some light I'd appreciate it. I realize this may not be the forum but hopefully someone can point me in the right direction. My site is a site that will only have English characters in it.

View Replies !
Collation Choice
For a table that keeps info that is part of a dynamicly generated web page on a site that is in English and is directed at USA audiences, what would be the normal choice for collation?

View Replies !
Collation Issues
by default, my collation is set to latin1_swedish_ci, which I think is normal, but how do I switch that to normal English, or utf8 and keep that there as the default?

View Replies !
Collation Problem
I've just tried upgrading to 4.1, but have a problem with the new collation feature in 4.1.

I first tried to convert my old 3.23 db to utf8 during the installation procedure, but all the text and varchar columns had their lengths drastically shortened e.g. from 255 to 85, which caused a fatal loss of data.
Then I tried installing it using latin1, but all the tables ended up with a collation of latin1_swedish_ci instead of latin1_general_ci, which I would have thought would be the logical default. This still gives some problems when comparing my data and it will be a huge job to go through manually changing all columns to latin1_general_ci.
So, does anyone know of a way to make MySQL upgrade my old databases using latin1_general_ci instead of the swedish version? Also, if anyone knows of a way to convert to utf8 without the enormous loss of data

View Replies !
Charsets/Collation
I have a database of words that includes many names that contain accents, including accents on almost any letter. For instance:

Þórr
Æðelþryð
Štefan
Željko

What charset or collation should I be using? I'm using latin1_swedish_ci right now and it's giving me some problems, specifically at least with these characters, replacing them with question marks. It handles others fine.

&#351;
&#283;
&#273;
&#322;

View Replies !
Collation And Type
they are set on InnoDB and latin1_swedish_ci and I would to change to some different.How to change default collation and type?

View Replies !
List Collation
i want to list table name which collation is not latin1_swedish_ci

what is the query ?

View Replies !
Loosing Collation
I got a problem with mySQL/phpmyadmin: It seems as if every table I do in mySQL that got text-cells like TINYTEXT would be setup with a "collate" somehow e.g. latin_spanish_ci or something like that. Now no soundex() query I do on those tables does work, so I guess this could be because of that... how can I loose that collate-thingy?
I mean I already tried setting up several tables by hand not using any "collate" but still the tables finally had collate within

View Replies !
Modify The Collation
I noticed that when creating tables using PhpMyAdmin I didn't set the collations and they are all set to "utf8_general_ci" where I need it to be utf8_bin. Is there a way I can alter all tables in the db.
I'm thinking of something along the lines:Code:

ALTER tables SET Collation = 'utf8_bin'

The above probably doesn't make sense,

View Replies !
Collation Is Latin
I use perl and mysql. The Collation is Latin1. I often place UTF-8 characters into my database and get errors. I'm not sure if this is a perl or mysql issue.

Does the collation Latin1 work with UTF-8 characters?

I read the blog below where someone compained about the Latin1
http://fplanque.net/Blog/devblog/2004/12/03/another_lousy_php_mysql_charset_issue

View Replies !
MySQL Collation
In my phpmyadmin, it shows all the tables as:

Collation: latin1_swedish_ci

What exactly is this collation? And what should I set it if I am using plain english?

View Replies !
Character Set And Collation
I am new to MySQL and transferring a database from MSSQL 2000 to MySQL. When creating a view the character_set defaults to utf8. I want it to be latin1. If I specify latin1 for the field in the view it works ok. Like:

SELECT _latin1 'Client Accounts' AS AccountName

Is there a central place where I can change it permanently so I don’t have to specify it in every view?

I have the following settings:

SHOW VARIABLES LIKE 'char%';
'character_set_client', 'utf8'
'character_set_connection', 'utf8'
'character_set_database', 'latin1'
'character_set_results', 'utf8'
'character_set_server', 'latin1'
'character_set_system', 'utf8'
'character_sets_dir', 'C:Program FilesMySQLMySQL Server 5.0sharecharsets'

SHOW VARIABLES LIKE 'coll%';
'collation_connection', 'utf8_general_ci'
'collation_database', 'latin1_swedish_ci'
'collation_server', 'latin1_swedish_ci'

I think I need to change 'character_set_connection' to 'latin1'. How do I do this please?

View Replies !
MySQL Collation!
System Info:
Linux localhost.localdomain 2.4.21-32.ELsmp #1

mysql Ver 14.7 Distrib 4.1.15, for pc-linux-gnu (i686) using readline 4.3

I am a newbie so please can someone help me!?


I have a dedicated Linux server and I want to det the default collation and character set to utf8.

From what I have read so far I have changed /etc/my.conf to:
old-passwords
default-character-set=utf8

This however has not helped. Do I need to recompile MySQL and if so how do I do it so that I can pass --default-character-set=utf8?

View Replies !
Collation Change
I have installed PHPBB forum on my mysql database and a problom appears when I try puting down some hebrew text.

In PHPmyadmin it says that the Collation is set to UTF-8 Unicode (utf8) in all of the tables, and I believe that is the problom... I don't know how to change that to hebrew (hebrew_bin or somthing), and i'm sure it could work if i knew how

View Replies !
What Collation Sequence?
I've just transferred a small PHP/MySQL application from a Firepages phpdev5 install to an XAMPP install, so I've got new versions of everything. I used phpMyAdmin to export and import the tables of the database. When recreating the database on my new install I selected the default collation (latin1_general_ci) but my application is now displaying ? in place of a number of characters so I guess I got it wrong. I can't see where in the old phpMyAdmin (2.3.0-rc3) to determine what collation the database uses.

View Replies !
Collation In MySQL
I was wondering what the term Collation means for my MySQL database. Automatically mine is set to latin-spanish or something like that. I don't see anything that has to do with English so I'm chasing my tail here. Help me out with some info plz.

View Replies !
Easy Collation Changing.
A while ago, I messed around with collations etc, without understanding the rammifications.Ended up with some tables swedish, some general and others, but all were under Latin1. After some time a few queries started breaking. Anyway, I played and tinkered and eventually managed to fix.
The problem was that I couldn't go and Alter thousands of columns manually, so a PHP script was created, and works fine.
But for the sake of knowledge, is there a way to change the Character Set and Collation stuff of an entire database(s) quickly and easily using SQL?

View Replies !
Query Collation Mapping?
is it possible to query the code mapping mysql uses for different collations -- I want to review the code mapping to compare

latin1_swedish_ci
latin1_german1_ci
latin1_bin
latin1_general_cs

====
this has a nice explanation of collation mapping:

View Replies !
Character Set :: Collation: Latin1_swedish_ci
Most of the tables that exist on my MySql server so far have the following:

Charset: latin1

Collation: latin1_swedish_ci

I would like to know whether it is a good idea for my tables to use these settings, and what the "standard" or most commonly used settings would be? Or what settings it is most sensible to be using.

View Replies !
Unknown Collation Problem
#1273 - Unknown collation: 'bJxHZ6M1mX6hwAXAbRdZA-J98V3_0AdfyjflUKgmpbk.'

And every time the string 'bJxHZ..." is different.

I installed and upgraded my system but still doesn't work.

I supposed the problem was in my.cnf and realized I didn't have a collation in that file, so I added

default-character-set = latin1
character-set-server = latin1
collation-server = latin1_spanish_ci

And, it worked but after a reboot, I get the same error.

My system is openSuSE 10.2, mysql 5.0.26 and apache 2.2.3

View Replies !
French Collation And Charset
I read the online manual to find how to change teh collation and charset wich I am now able to do. The only thing, is that I can't find one that support "é", "ô" and others like that.

Any1 know what is the good charset, collation mix for that?

View Replies !
Changing Field Collation
Has anybody every had to change the collation of all character based fields in all tables before?

I am looking to change it from latin1_swedish_ci to utf8_unicode_ci.

I've done it for the tables but now I need to do it from each character based field in each table. I could do it manually but I would be too time consuming for any human.

Any suggestions?

View Replies !
Does It Matter If Collation Is Latin1_swedish_ci?
This is odd, my web host installed WordPress software for me and it created a MySQL database. When I access the database through phpMyAdmin, it says MySQL connection collation is set to "utf8_unicode_ci", but in the database all of the tables show the collation set to "latin1_swedish_ci". This seems odd.

I'm having problems importing a database and wonder if this is the problem. And, if it is, how do I reset the collation?

View Replies !
Extending Collation-Tables
I want to extend an existing Collation-Table.
MySQL should also threat the character _ like '
- the same way it is threating ô as o and so on.

Is it possible to extend an existing Collation-Table - do I need a SUPER-Account to have enough rights?

View Replies !
Collation For Classical Greek
is there a collation for Classical Greek (polytonic)?

View Replies !
MySQL Collation And Greek
When you create a database with phpMyAdmin by default the collation of the database is latin1_swedish_ci! So you have to be very carefull from the begining to create the database with the right collation, (in my case, greek_general_ci)...

Well, my problem is that I have alreday made this mistake so now I have a database with wrong collation and all my greek content is stored as some crazy characters that I can not read.

In the real site you can see all the content ok and the source looks ok, but using wrong collations in your database is a very bad thing to do.

1. Is there any way to change the encoding of the database?
2. Is there any way to convert my data to a usefull form (greek)?

Any suggestions?

View Replies !
Collation When Creating New Table.
OK as I use phpMyAdmin to create a new table, it asks me what collation I want to use for each field.

Below the table then, it asks me what collation I want to use for the table. Is this not a bit of duplication? If I set the collation for the table as 'latin1_general_cs', will that be the collation for all the fields if I don't specify them individually?

View Replies !
MySQL Collation For Text?
By default MySQL puts text types into latin_swedish collation

.... but is utf08_general_ci better? Is this one more universal?

View Replies !
Convert Table To Other Collation
here, i want to convert my table ( all columns and data )
with current collation is : latin1_swedish_ci
to utf8_general_ci
what's the query i can use?

View Replies !
Collation For Spanish Characters And PHP
I am building a web application in PHP and MySQL that expects the use of spanish letters (á,é,í,ó,ú,ñ,ü). I have my collation set to latin1_general_ci and the default charset of apache is utf8... Is this a problem? Should I use utf8 as a collation in mysql??? PHP doesnt support utf8 so if i need to modify data from the database, will this be a problem?? Any comments on how to avoid having random characters in my the web site are welcomed.

View Replies !
How To Set Character Set And Collation For Few Tables
I have database with like 50 tables. I need to convert all these tables to UTF-8 (both character set and collation). I wonder how can I do it automatically using only MySQL? Is there any way to do it?

View Replies !
Collation Keeps Going To Latin1_swedish_ci -- How To Stop That?
in phpMyAdmin for the table structure, under the 'collation' column, for varchar rows, it always says "latin1_swedish_ci". where does this keep coming from? i presume it's the character encoding which mysql is using for those varchar values. on the home page of my phpMyAdmin's set up i've set "MySQL connection collation" to 'utf8_unicode_ci' and i can't see any other character encoding settings.

View Replies !
What Does _bin At Collation Mean In Mysql?
that does collation with latin1_bin mean, expecially _bin? What affects does collation have on data stored in particular character set?

View Replies !
Messed Up Charset & Collation
have made a bit of a mess of our database. Without learning anywhere near enough about the implication of changing the website charset and database collation I made a few tweeks. Now we have strange characters as a result and I think database contents that are neither one collation or another as its now a bit of a mix.

I'm looking to have everything as UTF-8 but am now realising that there may be quite a lot of data that need tidying up as a result. Our database if currently latin1_swedish_ci and our website is UTF-8,

View Replies !
Changing DB Charactor/Collation Sets
We have a large database with lots of user inputted information and I have been working on some MYSQL union queries which have been giving me illegal errors. I have pinned the error down to inconsistent column collation character sets.

It seems that we have character sets of 'latin1' using collations of 'latin1_general_ci' and 'latin1_swedish_ci'.

So my question is if I were to change the collation say to 'latin_general_ci' to all columns in all the tables in the database would this have any impact on the existing data ?

View Replies !
Case Sensitive Collation Type
what character set should i choose if i need a case sensitive behaviour across the DB( better across the server ). Should i have to set the character_set_database or the collation_database variabe in the conf to effect the changes while starting.

View Replies !
Collation :: Chinese Characters In Latin1_swedish_ci
I used 4.1.8 to create a database with latin1_swedish_ci collation. And input some Chinese by web with UTF-8. When I export it to a file then import to another database, all characters become symbol in the new database. Why this happen? How can I recover the Chinese?

View Replies !
How To Change Collation On One Existing Table
In one existing table in my data base I change collation for all fields but if I see list of all tables this table has still wrong collation. Is there any way to change collation for table in phpAdmin.

View Replies !
Illegal Mix Of Collation (swedish And General)
i got a XAMP running on my PC with Windows XP. I`m operating with MySQL-Front on my database.
Now i've tried to import in my adress pool an ordinary excel file with the most interessting zip codes (only zip code and city columns) as a csv file.
When i try to mix both by using a select command like this one

select *
from tabeleadresses,tablezip
where city=tablezip_city

there's a fault:

Illegal mix of collations latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='

Opening the properties of localhost i see the variables
collation_connection -> latin1_general_ci
collation_database -> latin1_general_ci
but
collation_server collation_server -> latin1_swedish_ci .

I've gegoogled the poroblem but i had no satisfied solution
The mysql manual says:
configure --with-collation=GENERAL

or when tables allready build
myisamchk -r -q --set-collation=collation_name

Anytime i get an error.
Changing the word or the properties variable collaction_server causes a hang up of the properties window.

View Replies !
Converting Collation On A 'mediumtext' Field
I'm converting the collation for a set of tables from latin1_swedish_ci to cp1256_general_ci. the conversion works fine on every field with a 'simple' text type (varchar, char, text, tinytext). but when it comes to fields of types like mediumtext or longtext, i get a series of '???' for every non ascii caracter of the content.

is there something i missed ? could someone give a hint on this issue please ?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved