Tips and Tricks in a world of Mix

The problem is that the hoster creates the db in the wrong collation , therefore no hebrew is possible for me in my sites , which is not to good , considering my business is primarily in Israel .
I’ve been trying to solve it with a one single query, but with no luck.
There are a few solutions through php scripts, witch you are placing on the host and activating from there.
I worked at MySql side only.
So , a few steps for workaround ..
1). Get the list of the tables from your information_schema , that is being provided by the hoster. The query would look like –

SELECT table_name
FROM information_schema.tables
AND TABLE_SCHEMA = ‘Your_DB_Name_Goes_Here’
and TABLE_COLLATION ‘utf8_general_ci’

Run it through the sql window of PhpMyAdmin.

You’ll get the list of a specific database tables , which are not defined with ‘utf8_general_ci’ Collation.

2).At the bottom of the list activate the export . Export to CSV.

3).Very basic – enter xsl ,
write down (leaving blanks as blank columns)
first column second column blank column for table name forth column
ALTER TABLE here4u_jo151.___________ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

4).Pull it down for as much rows as the number of the tables you got, for your db_name before.

5).Just pour out to the blank column all the table_names.

6).Take all the queries to Sql of the PhpMyAdmin and run it.
(Be careful, put ‘,’ at the end of each line ; pay attention that there are no blanks between the db name and the table name in the queries from excel.)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: