Ubuntu16.04重新安装MySQL数据库
Ubuntu16.04彻底卸载MySQL
1, linux开启MySQL binlog日志
2, mysql开启远程访问:
进入mysql
grant all privileges on *.* to'root'@'%' identified by '密码' with grant option;
flush privileges;
退出mysql,修改/etc/mysql/mysql.conf.d/mysqld.cnf
文件的第43行
把 bind-address = 127.0.0.1
改为 bind-address = 0.0.0.0
重启mysql服务 sudo service mysql restart
3, mysql修改默认端口,默认编码:
修改/etc/mysql/mysql.conf.d/mysqld.cnf
文件中
[mysqld]下面的port
的值
插入一行:
character-set-server=utf8mb4
在/etc/mysql/conf.d/mysql.cnf
文件中的[mysql]
下,插入:
default-character-set=utf8 mb4
重启mysql
sudo service mysql restart
4, 安装mycli
sudo apt install mycli
网友评论