Docker internal installation mysql

apt-get install net-tools
apt-get install mysql-server
service mysql start   啓動mysql
netstat -tap | grep mysql

mysql -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
相關文章
相關標籤/搜索