apt-get install net-toolsapt-get install mysql-serverservice mysql start 启动mysqlnetstat -tap | grep mysqlmysql -u root -p root查看数据库编码:show variables like "char%"修改编码:vim /etc/mysql/my.cnf[client]default-character-set=utf8[mysqld]character-set-server=utf8[mysql]default-character-set=utf8重启mysql:service mysql restart查看监听的端口:netstat -nlp |grep LISTEN