Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
In case you want to store special characters inside of MySQL table field, you need to change the table encoding like below:
ALTER TABLE YOUR_TABLE CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

#database #mysql #charset #character_set #collate #utf8 #utf8_unicode_ci #alter
To see your current database in MySQL:

mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| my_data |
+------------+
1 row in set (0.00 sec)

As shown above my current database is my_data. I usually forgot what db I'm currently on, when I use tmux and my session has been kept open for weeks. That's why! :)

#mysql #database #current_database #current_db