Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the phpmyadmin database encoding

I have a database, some of its data is in hebrew, and I see those symbols..

בדיקות ×™×“× ×™×•×ª   בדיקות ×™×“× ×™×•×ª

Is there a way to configure the database so I wont see those symbols?!??

Chrome , as opposed to firefox, also displays those weird symbols.. weird squares

like image 953
Dmitry Makovetskiyd Avatar asked Jan 27 '12 17:01

Dmitry Makovetskiyd


People also ask

How do I change the encoding of a database?

To change the character set encoding to UTF-8 for the database itself, type the following command at the mysql> prompt. Replace dbname with the database name: Copy ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci; To exit the mysql program, type \q at the mysql> prompt.

How do I change utf8mb4 to utf8?

To solve the problem open the exported SQL file, search and replace the utf8mb4 with utf8 , after that search and replace the utf8mb4_unicode_520_ci with utf8_general_ci . Save the file and import it into your database. After that, change the wp-config. php charset option to utf8 , and the magic starts.

How do I change phpMyAdmin code?

Click on the table you wish to modify. Inside the table, you will see a list of columns. To the right of the column name, you will see a link called "Change" under the Actions. Click on the Change link for the column you wish to modify.

How do I change MySQL from utf8 to latin1?

Similarly, here's the command to change character set of MySQL table from latin1 to UTF8. Replace table_name with your database table name. mysql> ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; Hopefully, the above tutorial will help you change database character set to utf8mb4 (UTF-8).


1 Answers

From a command line:

ALTER TABLE table_name CONVERT TO CHARACTER SET charset_name; 

Otherwise from phpmyadmin you could export and then import the database while changing the encoding. When you export it, at the end of the file you'll see something like CHARSET=hebrew_general_ci; Just replace it with whatever you need (e.g. CHARSET=utf8 or CHARSET=latin1_general_ci)

like image 51
j08691 Avatar answered Sep 24 '22 17:09

j08691