mysql is commonly used to set the character set encoding auto complete (auto prompt) and monitor ip on the external network
- 2020-05-13 03:40:50
- OfStack
Set mysql to listen to the extranet ip
Set mysql character set charset
mysql autoprompt, command autocomplete, syntax prompt
Note: the article I wrote before is too long, there is repetition, which violates DRY.
sudo vi /etc/my.cnf
bind-address = 127.0.0.1
Set mysql character set charset
sudo vi /etc/my.cnf
in [mysqld] The following add 1 line
character_set_server = utf8
in [mysql] The following add 1 line
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 autoprompt, command autocomplete, syntax prompt
sudo vi /etc/my.cnf
find [mysql]
[mysql]
#no-auto-rehash
auto-rehash
sudo /usr/local/mysql/support-files/mysql.server restart
mysql -uroot -p1
use mysql
You must first use1 A library, press tab Key to automatically prompt.
Note: the article I wrote before is too long, there is repetition, which violates DRY.