Set the mysql listening Internet ip Address
Copy codeThe Code is as follows: sudo vi/etc/my. cnf
Bind-address = 127.0.0.1
Set mysql Character Set charsetCopy codeThe Code is as follows: sudo vi/etc/my. cnf
Add a line under [mysqld]
Character_set_server = utf8
Add a line under [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 automatic prompt, command automatic completion, syntax promptCopy codeThe Code is as follows: 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 use a library and press the tab key to automatically prompt.
Note: The previous articles are too long, repeated, and against DRY. Now we can sort them out.