| 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/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.01 sec)
20 /var/lib/mysql 是存放数据库文件的目录;
21 /var/log 目录下的 mysqld.log 文件记录 MySQL 的日志;
22 MySQL 采用的 TCP/IP 协议传输数据,默认端口号为 3306,我们可以通过如下命令查看:
netstat -anp
23 忘记密码时,可用如下方法重置:
# service mysqld stop
# mysqld_safe --user=root --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> update user set password=password("new_password") where user="root";
mysql> flush privileges;