mysql 經常使用設置 字符集編碼、主動完成(主動提醒)、監聽外網ip。本站提示廣大學習愛好者:(mysql 經常使用設置 字符集編碼、主動完成(主動提醒)、監聽外網ip)文章只能為提供參考,不一定能成為您想要的結果。以下是mysql 經常使用設置 字符集編碼、主動完成(主動提醒)、監聽外網ip正文
設置mysql監聽外網ip
sudo vi /etc/my.cnf
bind-address = 127.0.0.1
設置mysql 字符集 charset
sudo vi /etc/my.cnf
在[mysqld]上面參加一行
character_set_server = utf8
在[mysql]上面參加一行
default-character-set = utf8
sudo /usr/local/mysql/support-files/mysql.server restart
mysql -uroot -p1
mysql> status
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
mysql> show variables like 'character_set%';
+--------------------------+----------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
mysql主動提醒,敕令主動完成,語法提醒
sudo vi /etc/my.cnf
找到[mysql]
[mysql]
#no-auto-rehash
auto-rehash
sudo /usr/local/mysql/support-files/mysql.server restart
mysql -uroot -p1
use mysql
必需先use一個庫,按tab鍵能力主動提醒。
解釋:之前寫的文章太長,有反復,違背DRY,如今整頓出來。