max_
max_

Reputation: 24491

Replace text in MySql database

I have a MySql database on my server with a table named table_1. However I imported a csv file which occasionally included "café". However the "é" was not inserted into the database table, so I have been left with the text "caf". So what I would like to know is how can I replace the word "caf" in my database table with "cafe"?

Upvotes: 0

Views: 118

Answers (2)

Gareve
Gareve

Reputation: 3391

This is a common problem of encoding. I sugest that you change your mysql database to utf-8 via GUI or with this information

Upvotes: 1

Codebeef
Codebeef

Reputation: 44026

Looks like an encoding issue to me - make sure you're using UTF-8 throughout your DB, and reimport your CSV.

If you've used the LOAD DATA command in MySQL, you can pass it a CHARACTER SET, which, when set to 'utf8' should allow you to import that file correctly.

Upvotes: 1

Related Questions